OSDN Git Service

(split) LDP: Update ja.po snapshots.
[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-05-08 01:02+0900\n"
10 "PO-Revision-Date: 2012-05-08 01:25+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 build/C/man2/process_vm_readv.2:27
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 build/C/man2/process_vm_readv.2:28
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 build/C/man2/process_vm_readv.2:30
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 build/C/man2/process_vm_readv.2:48
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:187
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 #: build/C/man2/process_vm_readv.2:207
212 #, no-wrap
213 msgid "RETURN VALUE"
214 msgstr "返り値"
215
216 #. type: Plain text
217 #: build/C/man3/asprintf.3:59
218 msgid ""
219 "When successful, these functions return the number of bytes printed, just "
220 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
221 "error occurs, these functions will return -1, and the contents of I<strp> is "
222 "undefined."
223 msgstr ""
224 "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返"
225 "す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数"
226 "は -1 を返し、 I<strp> の内容は未定義となる。"
227
228 #. type: SH
229 #: build/C/man3/asprintf.3:59 build/C/man3/ctermid.3:59
230 #: build/C/man3/dprintf.3:68 build/C/man3/fclose.3:88
231 #: build/C/man3/fcloseall.3:54 build/C/man3/ferror.3:105
232 #: build/C/man3/fflush.3:91 build/C/man3/fgetwc.3:65
233 #: build/C/man3/flockfile.3:119 build/C/man3/fmemopen.3:191
234 #: build/C/man3/fmtmsg.3:221 build/C/man3/fopen.3:244
235 #: build/C/man3/fopencookie.3:242 build/C/man3/fpurge.3:68
236 #: build/C/man3/fputwc.3:63 build/C/man3/fread.3:101 build/C/man3/fseek.3:164
237 #: build/C/man3/fseeko.3:75 build/C/man3/getline.3:132 build/C/man3/gets.3:136
238 #: build/C/man3/getw.3:78 build/C/man2/link.2:128 build/C/man2/llseek.2:76
239 #: build/C/man2/lseek.2:189 build/C/man2/open.2:610 build/C/man3/perror.3:111
240 #: build/C/man2/pipe.2:118 build/C/man3/popen.3:167 build/C/man3/printf.3:807
241 #: build/C/man3/puts.3:101 build/C/man2/read.2:155 build/C/man2/readlink.2:123
242 #: build/C/man2/readv.2:212 build/C/man3/remove.3:70 build/C/man2/rename.2:229
243 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:575 build/C/man3/setbuf.3:162
244 #: build/C/man3/stdin.3:109 build/C/man3/stdio.3:244
245 #: build/C/man2/symlink.2:144 build/C/man3/tempnam.3:94
246 #: build/C/man3/tmpfile.3:74 build/C/man3/tmpnam.3:75
247 #: build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:111
248 #: build/C/man3/wprintf.3:193 build/C/man2/write.2:179
249 #: build/C/man2/process_vm_readv.2:277
250 #, no-wrap
251 msgid "CONFORMING TO"
252 msgstr "準拠"
253
254 #. type: Plain text
255 #: build/C/man3/asprintf.3:65
256 msgid ""
257 "These functions are GNU extensions, not in C or POSIX.  They are also "
258 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
259 "error."
260 msgstr ""
261 "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD で"
262 "も利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットす"
263 "る。"
264
265 #. type: SH
266 #: build/C/man3/asprintf.3:65 build/C/man3/ctermid.3:69
267 #: build/C/man3/dprintf.3:94 build/C/man3/fclose.3:100
268 #: build/C/man3/fcloseall.3:56 build/C/man3/ferror.3:112
269 #: build/C/man3/fflush.3:106 build/C/man3/fgetwc.3:82
270 #: build/C/man3/flockfile.3:127 build/C/man3/fmemopen.3:273
271 #: build/C/man3/fmtmsg.3:293 build/C/man3/fopen.3:346
272 #: build/C/man3/fopencookie.3:434 build/C/man3/fpurge.3:78
273 #: build/C/man3/fputwc.3:80 build/C/man3/fread.3:103 build/C/man3/fseek.3:166
274 #: build/C/man3/fseeko.3:81 build/C/man3/getline.3:166 build/C/man3/gets.3:171
275 #: build/C/man3/getw.3:84 build/C/man2/link.2:177 build/C/man2/llseek.2:82
276 #: build/C/man2/lseek.2:234 build/C/man3/lseek64.3:157 build/C/man2/open.2:849
277 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:196
278 #: build/C/man3/printf.3:1074 build/C/man3/puts.3:110 build/C/man2/read.2:178
279 #: build/C/man2/readlink.2:212 build/C/man2/readv.2:282
280 #: build/C/man3/remove.3:81 build/C/man2/rename.2:242 build/C/man2/rmdir.2:132
281 #: build/C/man3/scanf.3:717 build/C/man3/setbuf.3:198 build/C/man3/stdin.3:150
282 #: build/C/man3/stdio.3:248 build/C/man3/stdio_ext.3:130
283 #: build/C/man2/symlink.2:159 build/C/man7/symlink.7:470
284 #: build/C/man3/tempnam.3:164 build/C/man3/tmpfile.3:86
285 #: build/C/man3/tmpnam.3:151 build/C/man2/unlink.2:148
286 #: build/C/man3/unlocked_stdio.3:134 build/C/man3/wprintf.3:229
287 #: build/C/man2/write.2:205 build/C/man2/process_vm_readv.2:329
288 #, no-wrap
289 msgid "SEE ALSO"
290 msgstr "関連項目"
291
292 #. type: Plain text
293 #: build/C/man3/asprintf.3:69
294 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
295 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
296
297 #. type: SH
298 #: build/C/man3/asprintf.3:69 build/C/man3/ctermid.3:71
299 #: build/C/man3/dprintf.3:96 build/C/man3/fclose.3:106
300 #: build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:117
301 #: build/C/man3/fflush.3:114 build/C/man3/fgetwc.3:87
302 #: build/C/man3/flockfile.3:129 build/C/man3/fmemopen.3:276
303 #: build/C/man3/fmtmsg.3:296 build/C/man3/fopen.3:352
304 #: build/C/man3/fopencookie.3:439 build/C/man3/fpurge.3:83
305 #: build/C/man3/fputwc.3:84 build/C/man3/fread.3:109 build/C/man3/fseek.3:169
306 #: build/C/man3/fseeko.3:83 build/C/man3/getline.3:173 build/C/man3/gets.3:187
307 #: build/C/man3/getw.3:90 build/C/man2/link.2:187 build/C/man2/llseek.2:85
308 #: build/C/man2/lseek.2:241 build/C/man3/lseek64.3:160 build/C/man2/open.2:871
309 #: build/C/man3/perror.3:144 build/C/man2/pipe.2:197 build/C/man3/popen.3:206
310 #: build/C/man3/printf.3:1083 build/C/man3/puts.3:122 build/C/man2/read.2:191
311 #: build/C/man2/readlink.2:220 build/C/man2/readv.2:286
312 #: build/C/man3/remove.3:92 build/C/man2/rename.2:251 build/C/man2/rmdir.2:141
313 #: build/C/man3/scanf.3:724 build/C/man3/setbuf.3:206 build/C/man3/stdin.3:156
314 #: build/C/man3/stdio.3:255 build/C/man3/stdio_ext.3:133
315 #: build/C/man2/symlink.2:171 build/C/man7/symlink.7:488
316 #: build/C/man3/tempnam.3:169 build/C/man3/tmpfile.3:92
317 #: build/C/man3/tmpnam.3:156 build/C/man2/unlink.2:161
318 #: build/C/man3/unlocked_stdio.3:137 build/C/man3/wprintf.3:236
319 #: build/C/man2/write.2:217 build/C/man2/process_vm_readv.2:332
320 #, no-wrap
321 msgid "COLOPHON"
322 msgstr "この文書について"
323
324 #. type: Plain text
325 #: build/C/man3/asprintf.3:76 build/C/man3/ctermid.3:78
326 #: build/C/man3/dprintf.3:103 build/C/man3/fclose.3:113
327 #: build/C/man3/fcloseall.3:69 build/C/man3/ferror.3:124
328 #: build/C/man3/fflush.3:121 build/C/man3/fgetwc.3:94
329 #: build/C/man3/flockfile.3:136 build/C/man3/fmemopen.3:283
330 #: build/C/man3/fmtmsg.3:303 build/C/man3/fopen.3:359
331 #: build/C/man3/fopencookie.3:446 build/C/man3/fpurge.3:90
332 #: build/C/man3/fputwc.3:91 build/C/man3/fread.3:116 build/C/man3/fseek.3:176
333 #: build/C/man3/fseeko.3:90 build/C/man3/getline.3:180 build/C/man3/gets.3:194
334 #: build/C/man3/getw.3:97 build/C/man2/link.2:194 build/C/man2/llseek.2:92
335 #: build/C/man2/lseek.2:248 build/C/man3/lseek64.3:167 build/C/man2/open.2:878
336 #: build/C/man3/perror.3:151 build/C/man2/pipe.2:204 build/C/man3/popen.3:213
337 #: build/C/man3/printf.3:1090 build/C/man3/puts.3:129 build/C/man2/read.2:198
338 #: build/C/man2/readlink.2:227 build/C/man2/readv.2:293
339 #: build/C/man3/remove.3:99 build/C/man2/rename.2:258 build/C/man2/rmdir.2:148
340 #: build/C/man3/scanf.3:731 build/C/man3/setbuf.3:213 build/C/man3/stdin.3:163
341 #: build/C/man3/stdio.3:262 build/C/man3/stdio_ext.3:140
342 #: build/C/man2/symlink.2:178 build/C/man7/symlink.7:495
343 #: build/C/man3/tempnam.3:176 build/C/man3/tmpfile.3:99
344 #: build/C/man3/tmpnam.3:163 build/C/man2/unlink.2:168
345 #: build/C/man3/unlocked_stdio.3:144 build/C/man3/wprintf.3:243
346 #: build/C/man2/write.2:224 build/C/man2/process_vm_readv.2:339
347 msgid ""
348 "This page is part of release 3.40 of the Linux I<man-pages> project.  A "
349 "description of the project, and information about reporting bugs, can be "
350 "found at http://www.kernel.org/doc/man-pages/."
351 msgstr ""
352 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.40 の一部\n"
353 "である。プロジェクトの説明とバグ報告に関する情報は\n"
354 "http://www.kernel.org/doc/man-pages/ に書かれている。"
355
356 #. type: TH
357 #: build/C/man3/ctermid.3:24
358 #, no-wrap
359 msgid "CTERMID"
360 msgstr "CTERMID"
361
362 #. type: TH
363 #: build/C/man3/ctermid.3:24
364 #, no-wrap
365 msgid "2007-07-26"
366 msgstr "2007-07-26"
367
368 #. type: Plain text
369 #: build/C/man3/ctermid.3:27
370 msgid "ctermid - get controlling terminal name"
371 msgstr "ctermid - 制御端末名の取得"
372
373 #. type: Plain text
374 #: build/C/man3/ctermid.3:32 build/C/man3/fgetwc.3:22
375 #: build/C/man3/flockfile.3:29 build/C/man3/fmemopen.3:12
376 #: build/C/man3/fopen.3:48 build/C/man3/fputwc.3:20 build/C/man3/fread.3:49
377 #: build/C/man3/fseeko.3:29 build/C/man3/getline.3:30 build/C/man3/gets.3:31
378 #: build/C/man3/getw.3:29 build/C/man3/popen.3:44 build/C/man3/puts.3:30
379 #: build/C/man3/scanf.3:56 build/C/man3/setbuf.3:52 build/C/man3/stdin.3:15
380 #: build/C/man3/tempnam.3:29 build/C/man3/tmpfile.3:35
381 #: build/C/man3/tmpnam.3:31 build/C/man3/unlocked_stdio.3:30
382 #, no-wrap
383 msgid "B<#include E<lt>stdio.hE<gt>>\n"
384 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
385
386 #. type: Plain text
387 #: build/C/man3/ctermid.3:34
388 #, no-wrap
389 msgid "B<char *ctermid(char *>I<s>B<);>\n"
390 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
391
392 #. type: Plain text
393 #: build/C/man3/ctermid.3:39 build/C/man3/dprintf.3:38
394 #: build/C/man3/ferror.3:59 build/C/man3/flockfile.3:40
395 #: build/C/man3/fmemopen.3:25 build/C/man3/fopen.3:59
396 #: build/C/man3/getline.3:40 build/C/man3/getw.3:38 build/C/man3/perror.3:49
397 #: build/C/man3/popen.3:53 build/C/man3/printf.3:63 build/C/man2/readlink.2:52
398 #: build/C/man2/readv.2:51 build/C/man3/scanf.3:71 build/C/man3/setbuf.3:66
399 #: build/C/man2/symlink.2:43 build/C/man3/tempnam.3:36
400 #: build/C/man3/unlocked_stdio.3:66 build/C/man3/wprintf.3:37
401 msgid ""
402 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
403 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
404
405 #.  From <unistd.h>: _XOPEN_SOURCE
406 #. type: Plain text
407 #: build/C/man3/ctermid.3:44
408 msgid ""
409 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
410 msgstr ""
411 "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
412
413 #. type: Plain text
414 #: build/C/man3/ctermid.3:57
415 msgid ""
416 "B<ctermid>()  returns a string which is the pathname for the current "
417 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
418 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
419 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
420 "the returned pathname."
421 msgstr ""
422 "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場"
423 "合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに"
424 "使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパ"
425 "ス名の最大文字数である。"
426
427 #. type: Plain text
428 #: build/C/man3/ctermid.3:59
429 msgid "The pointer to the pathname."
430 msgstr "パス名へのポインタ。"
431
432 #. type: Plain text
433 #: build/C/man3/ctermid.3:61
434 msgid "Svr4, POSIX.1-2001."
435 msgstr "SVr4, POSIX.1-2001."
436
437 #. type: SH
438 #: build/C/man3/ctermid.3:61 build/C/man3/fmemopen.3:201
439 #: build/C/man3/fopen.3:329 build/C/man3/gets.3:150 build/C/man3/getw.3:80
440 #: build/C/man2/link.2:171 build/C/man2/open.2:838 build/C/man3/popen.3:173
441 #: build/C/man3/printf.3:930 build/C/man3/puts.3:103 build/C/man2/readv.2:256
442 #: build/C/man3/remove.3:78 build/C/man2/rename.2:231 build/C/man2/rmdir.2:129
443 #: build/C/man3/scanf.3:682 build/C/man3/setbuf.3:168
444 #: build/C/man3/tempnam.3:154 build/C/man3/tmpnam.3:144
445 #: build/C/man2/unlink.2:145
446 #, no-wrap
447 msgid "BUGS"
448 msgstr "バグ"
449
450 #. type: Plain text
451 #: build/C/man3/ctermid.3:65
452 msgid ""
453 "The path returned may not uniquely identify the controlling terminal; it "
454 "may, for example, be I</dev/tty>."
455 msgstr ""
456 "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> の"
457 "ように。"
458
459 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
460 #.  if ctermid() was given an argument; fixed in 2.4.
461 #. type: Plain text
462 #: build/C/man3/ctermid.3:69
463 msgid "It is not assured that the program can open the terminal."
464 msgstr "プログラムが端末をオープンできることは保証されていない。"
465
466 #. type: Plain text
467 #: build/C/man3/ctermid.3:71
468 msgid "B<ttyname>(3)"
469 msgstr "B<ttyname>(3)"
470
471 #. type: TH
472 #: build/C/man3/dprintf.3:25
473 #, no-wrap
474 msgid "DPRINTF"
475 msgstr "DPRINTF"
476
477 #. type: TH
478 #: build/C/man3/dprintf.3:25 build/C/man3/fmemopen.3:6
479 #, no-wrap
480 msgid "2010-09-15"
481 msgstr "2010-09-15"
482
483 #. type: Plain text
484 #: build/C/man3/dprintf.3:28
485 msgid "dprintf, vdprintf - print to a file descriptor"
486 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
487
488 #. type: Plain text
489 #: build/C/man3/dprintf.3:32
490 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
491 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
492
493 #. type: Plain text
494 #: build/C/man3/dprintf.3:34
495 msgid ""
496 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
497 msgstr ""
498 "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
499
500 #. type: Plain text
501 #: build/C/man3/dprintf.3:42
502 msgid "B<dprintf>(), B<vdprintf>():"
503 msgstr "B<dprintf>(), B<vdprintf>():"
504
505 #. type: TP
506 #: build/C/man3/dprintf.3:45 build/C/man3/fmemopen.3:33
507 #: build/C/man3/getline.3:47
508 #, no-wrap
509 msgid "Since glibc 2.10:"
510 msgstr "glibc 2.10 以降:"
511
512 #. type: Plain text
513 #: build/C/man3/dprintf.3:48 build/C/man3/fmemopen.3:36
514 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
515 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
516
517 #. type: TP
518 #: build/C/man3/dprintf.3:48 build/C/man3/fmemopen.3:36
519 #: build/C/man3/getline.3:50
520 #, no-wrap
521 msgid "Before glibc 2.10:"
522 msgstr "glibc 2.10 より前:"
523
524 #. type: Plain text
525 #: build/C/man3/dprintf.3:51 build/C/man3/fmemopen.3:39
526 #: build/C/man3/getline.3:53 build/C/man3/unlocked_stdio.3:102
527 msgid "_GNU_SOURCE"
528 msgstr "_GNU_SOURCE"
529
530 #. type: Plain text
531 #: build/C/man3/dprintf.3:68
532 msgid ""
533 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
534 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
535 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
536 msgstr ""
537 "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、そ"
538 "れぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 こ"
539 "れらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を"
540 "行う。"
541
542 #.  .SH NOTES
543 #.  These functions are GNU extensions, not in C or POSIX.
544 #.  Clearly, the names were badly chosen.
545 #.  Many systems (like MacOS) have incompatible functions called
546 #.  .BR dprintf (),
547 #.  usually some debugging version of
548 #.  .BR printf (3),
549 #.  perhaps with a prototype like
550 #.  .BI "void dprintf(int level, const char *" format ", ...);"
551 #.  where the first argument is a debugging level (and output is to
552 #.  .IR stderr ).
553 #.  Moreover,
554 #.  .BR dprintf ()
555 #.  (or
556 #.  .BR DPRINTF )
557 #.  is also a popular macro name for a debugging printf.
558 #.  So, probably, it is better to avoid this function in programs
559 #.  intended to be portable.
560 #.  A better name would have been
561 #.  .BR fdprintf ().
562 #. type: Plain text
563 #: build/C/man3/dprintf.3:94
564 msgid ""
565 "These functions are GNU extensions that are nowadays specified in "
566 "POSIX.1-2008."
567 msgstr ""
568 "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されてい"
569 "る。"
570
571 #. type: Plain text
572 #: build/C/man3/dprintf.3:96
573 msgid "B<printf>(3)"
574 msgstr "B<printf>(3)"
575
576 #. type: TH
577 #: build/C/man3/fclose.3:42
578 #, no-wrap
579 msgid "FCLOSE"
580 msgstr "FCLOSE"
581
582 #. type: TH
583 #: build/C/man3/fclose.3:42 build/C/man2/read.2:35
584 #, no-wrap
585 msgid "2009-02-23"
586 msgstr "2009-02-23"
587
588 #. type: Plain text
589 #: build/C/man3/fclose.3:45
590 msgid "fclose - close a stream"
591 msgstr "fclose - ストリームを閉じる"
592
593 #. type: Plain text
594 #: build/C/man3/fclose.3:49
595 msgid "B<int fclose(FILE *>I<fp>B<);>"
596 msgstr "B<int fclose(FILE *>I<fp>B<);>"
597
598 #. type: Plain text
599 #: build/C/man3/fclose.3:57
600 msgid ""
601 "The B<fclose>()  function will flushes the stream pointed to by I<fp> "
602 "(writing any buffered output data using B<fflush>(3))  and closes the "
603 "underlying file descriptor."
604 msgstr ""
605 "B<fclose>()  関数は I<fp> で指されるストリームを (バッファリングされていた全"
606 "ての出力データを B<fflush>(3)  を用いて書き込んで) フラッシュし、 その基とな"
607 "るファイルディスクリプタをクローズする。"
608
609 #. type: Plain text
610 #: build/C/man3/fclose.3:68
611 msgid ""
612 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
613 "I<errno> is set to indicate the error.  In either case any further access "
614 "(including another call to B<fclose>())  to the stream results in undefined "
615 "behavior."
616 msgstr ""
617 "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が"
618 "返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのスト"
619 "リームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセス"
620 "は 未定義の動作を生じさせる。"
621
622 #. type: SH
623 #: build/C/man3/fclose.3:68 build/C/man3/ferror.3:95 build/C/man3/fflush.3:79
624 #: build/C/man3/fgetwc.3:59 build/C/man3/flockfile.3:117
625 #: build/C/man3/fopen.3:199 build/C/man3/fpurge.3:63 build/C/man3/fputwc.3:58
626 #: build/C/man3/fseek.3:132 build/C/man3/fseeko.3:72
627 #: build/C/man3/getline.3:120 build/C/man2/link.2:57 build/C/man2/llseek.2:64
628 #: build/C/man2/lseek.2:159 build/C/man2/open.2:472 build/C/man2/pipe.2:97
629 #: build/C/man3/popen.3:141 build/C/man2/read.2:77 build/C/man2/readlink.2:83
630 #: build/C/man2/readv.2:186 build/C/man3/remove.3:65 build/C/man2/rename.2:96
631 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:545 build/C/man2/symlink.2:89
632 #: build/C/man3/tempnam.3:90 build/C/man3/tmpfile.3:52
633 #: build/C/man3/tmpnam.3:73 build/C/man2/unlink.2:60 build/C/man2/write.2:107
634 #: build/C/man2/process_vm_readv.2:227
635 #, no-wrap
636 msgid "ERRORS"
637 msgstr "エラー"
638
639 #. type: TP
640 #: build/C/man3/fclose.3:69 build/C/man3/fflush.3:80 build/C/man3/fpurge.3:64
641 #: build/C/man3/fseek.3:133 build/C/man2/llseek.2:65 build/C/man2/lseek.2:160
642 #: build/C/man2/read.2:96 build/C/man3/scanf.3:551 build/C/man2/write.2:126
643 #, no-wrap
644 msgid "B<EBADF>"
645 msgstr "B<EBADF>"
646
647 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
648 #.   low-level file operations on the same stream. If you do get this error,
649 #.   you must have closed the stream's low-level file descriptor using
650 #.   something like close(fileno(fp)).
651 #. type: Plain text
652 #: build/C/man3/fclose.3:78
653 msgid "The file descriptor underlying I<fp> is not valid."
654 msgstr "I<fp> の基となるファイルディスクリプタが不正である。"
655
656 #. type: Plain text
657 #: build/C/man3/fclose.3:88
658 msgid ""
659 "The B<fclose>()  function may also fail and set I<errno> for any of the "
660 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
661 msgstr ""
662 "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  の"
663 "ルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定"
664 "された値に設定される。"
665
666 #. type: Plain text
667 #: build/C/man3/fclose.3:90 build/C/man3/fseek.3:166 build/C/man3/puts.3:103
668 msgid "C89, C99."
669 msgstr "C89, C99."
670
671 #. type: SH
672 #: build/C/man3/fclose.3:90 build/C/man3/fflush.3:97 build/C/man3/fgetwc.3:67
673 #: build/C/man3/fmemopen.3:195 build/C/man3/fmtmsg.3:236
674 #: build/C/man3/fopen.3:253 build/C/man3/fpurge.3:76 build/C/man3/fputwc.3:65
675 #: build/C/man3/fseeko.3:77 build/C/man2/link.2:133 build/C/man2/llseek.2:79
676 #: build/C/man2/lseek.2:199 build/C/man2/open.2:636 build/C/man3/perror.3:124
677 #: build/C/man3/printf.3:868 build/C/man2/read.2:157
678 #: build/C/man2/readlink.2:128 build/C/man2/readv.2:224
679 #: build/C/man3/remove.3:72 build/C/man3/scanf.3:606 build/C/man3/stdin.3:118
680 #: build/C/man2/symlink.2:150 build/C/man3/tempnam.3:99
681 #: build/C/man3/tmpfile.3:76 build/C/man3/tmpnam.3:80
682 #: build/C/man3/wprintf.3:195 build/C/man2/write.2:188
683 #: build/C/man2/process_vm_readv.2:279
684 #, no-wrap
685 msgid "NOTES"
686 msgstr "注意"
687
688 #. type: Plain text
689 #: build/C/man3/fclose.3:100
690 msgid ""
691 "Note that B<fclose>()  only flushes the user space buffers provided by the C "
692 "library.  To ensure that the data is physically stored on disk the kernel "
693 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
694 msgstr ""
695 "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュする"
696 "だけで ある点に注意すること。 データを確実に物理的にディスクに記録するために"
697 "は カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなけ"
698 "ればならない。"
699
700 #. type: Plain text
701 #: build/C/man3/fclose.3:106
702 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
703 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
704
705 #. type: TH
706 #: build/C/man3/fcloseall.3:24
707 #, no-wrap
708 msgid "FCLOSEALL"
709 msgstr "FCLOSEALL"
710
711 #. type: TH
712 #: build/C/man3/fcloseall.3:24
713 #, no-wrap
714 msgid "2006-12-27"
715 msgstr "2006-12-27"
716
717 #. type: Plain text
718 #: build/C/man3/fcloseall.3:27
719 msgid "fcloseall - close all open streams"
720 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
721
722 #. type: Plain text
723 #: build/C/man3/fcloseall.3:31 build/C/man3/fopencookie.3:31
724 #, no-wrap
725 msgid ""
726 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
727 "B<#include E<lt>stdio.hE<gt>>\n"
728 msgstr ""
729 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
730 "B<#include E<lt>stdio.hE<gt>>\n"
731
732 #. type: Plain text
733 #: build/C/man3/fcloseall.3:33
734 #, no-wrap
735 msgid "B<int fcloseall(void);>\n"
736 msgstr "B<int fcloseall(void);>\n"
737
738 #. type: Plain text
739 #: build/C/man3/fcloseall.3:42
740 msgid ""
741 "The B<fcloseall>()  function closes all of the calling process's open "
742 "streams.  Buffered output for each stream is written before it is closed (as "
743 "for B<fflush>(3)); buffered input is discarded."
744 msgstr ""
745 "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉"
746 "じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームの"
747 "バッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄さ"
748 "れる。"
749
750 #. type: Plain text
751 #: build/C/man3/fcloseall.3:49
752 msgid ""
753 "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
754 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
755
756 #. type: Plain text
757 #: build/C/man3/fcloseall.3:54
758 msgid ""
759 "This function returns 0 if all files were successfully closed; on error, "
760 "B<EOF> is returned."
761 msgstr ""
762 "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 "
763 "B<EOF> を返す。"
764
765 #. type: Plain text
766 #: build/C/man3/fcloseall.3:56
767 msgid "This function is a GNU extension."
768 msgstr "この関数は GNU 拡張である。"
769
770 #. type: Plain text
771 #: build/C/man3/fcloseall.3:62
772 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
773 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
774
775 #. type: TH
776 #: build/C/man3/ferror.3:42
777 #, no-wrap
778 msgid "FERROR"
779 msgstr "FERROR"
780
781 #. type: TH
782 #: build/C/man3/ferror.3:42 build/C/man3/flockfile.3:23
783 #: build/C/man3/unlocked_stdio.3:23
784 #, no-wrap
785 msgid "2008-08-29"
786 msgstr "2008-08-29"
787
788 #. type: Plain text
789 #: build/C/man3/ferror.3:45
790 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
791 msgstr ""
792 "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
793
794 #. type: Plain text
795 #: build/C/man3/ferror.3:49
796 msgid "B<void clearerr(FILE *>I<stream>B<);>"
797 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
798
799 #. type: Plain text
800 #: build/C/man3/ferror.3:51
801 msgid "B<int feof(FILE *>I<stream>B<);>"
802 msgstr "B<int feof(FILE *>I<stream>B<);>"
803
804 #. type: Plain text
805 #: build/C/man3/ferror.3:53
806 msgid "B<int ferror(FILE *>I<stream>B<);>"
807 msgstr "B<int ferror(FILE *>I<stream>B<);>"
808
809 #. type: Plain text
810 #: build/C/man3/ferror.3:55
811 msgid "B<int fileno(FILE *>I<stream>B<);>"
812 msgstr "B<int fileno(FILE *>I<stream>B<);>"
813
814 #. type: Plain text
815 #: build/C/man3/ferror.3:63
816 msgid ""
817 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
818 msgstr ""
819 "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
820
821 #. type: Plain text
822 #: build/C/man3/ferror.3:68
823 msgid ""
824 "The function B<clearerr>()  clears the end-of-file and error indicators for "
825 "the stream pointed to by I<stream>."
826 msgstr ""
827 "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示"
828 "子とエラー指示子をクリアする。"
829
830 #. type: Plain text
831 #: build/C/man3/ferror.3:77
832 msgid ""
833 "The function B<feof>()  tests the end-of-file indicator for the stream "
834 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
835 "indicator can only be cleared by the function B<clearerr>()."
836 msgstr ""
837 "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 "
838 "セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  に"
839 "よってのみクリアすることができる。"
840
841 #. type: Plain text
842 #: build/C/man3/ferror.3:86
843 msgid ""
844 "The function B<ferror>()  tests the error indicator for the stream pointed "
845 "to by I<stream>, returning nonzero if it is set.  The error indicator can "
846 "only be reset by the B<clearerr>()  function."
847 msgstr ""
848 "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテスト"
849 "し、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>"
850 "()  によってのみリセットすることができる。"
851
852 #. type: Plain text
853 #: build/C/man3/ferror.3:92
854 msgid ""
855 "The function B<fileno>()  examines the argument I<stream> and returns its "
856 "integer descriptor."
857 msgstr ""
858 "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
859
860 #. type: Plain text
861 #: build/C/man3/ferror.3:95 build/C/man3/fgetwc.3:53 build/C/man3/fputwc.3:52
862 #: build/C/man3/fread.3:81 build/C/man3/gets.3:109 build/C/man3/puts.3:82
863 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
864 msgstr ""
865 "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
866
867 #. type: Plain text
868 #: build/C/man3/ferror.3:105
869 msgid ""
870 "These functions should not fail and do not set the external variable "
871 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
872 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
873 msgstr ""
874 "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしな"
875 "い。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場"
876 "合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
877
878 #. type: Plain text
879 #: build/C/man3/ferror.3:112
880 msgid ""
881 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
882 "C99."
883 msgstr ""
884 "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89 と C99 に準拠している。"
885
886 #. type: Plain text
887 #: build/C/man3/ferror.3:117
888 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
889 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
890
891 #. type: TH
892 #: build/C/man3/fflush.3:43
893 #, no-wrap
894 msgid "FFLUSH"
895 msgstr "FFLUSH"
896
897 #. type: TH
898 #: build/C/man3/fflush.3:43
899 #, no-wrap
900 msgid "2009-09-06"
901 msgstr "2009-09-06"
902
903 #. type: Plain text
904 #: build/C/man3/fflush.3:46
905 msgid "fflush - flush a stream"
906 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
907
908 #. type: Plain text
909 #: build/C/man3/fflush.3:50
910 msgid "B<int fflush(FILE *>I<stream>B<);>"
911 msgstr "B<int fflush(FILE *>I<stream>B<);>"
912
913 #. type: Plain text
914 #: build/C/man3/fflush.3:61
915 msgid ""
916 "For output streams, B<fflush>()  forces a write of all user-space buffered "
917 "data for the given output or update I<stream> via the stream's underlying "
918 "write function.  For input streams, B<fflush>()  discards any buffered data "
919 "that has been fetched from the underlying file, but has not been consumed by "
920 "the application.  The open status of the stream is unaffected."
921 msgstr ""
922 "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされ"
923 "ているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはス"
924 "トリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新す"
925 "る。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得され"
926 "たが、アプリケーションからは 読み出されていないバッファデータを全て破棄す"
927 "る。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けな"
928 "い。"
929
930 #. type: Plain text
931 #: build/C/man3/fflush.3:69
932 msgid ""
933 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
934 "streams."
935 msgstr ""
936 "I<stream> 引数が .BR NULL ならば、 B<fflush>()  は開いているI<すべての>出力ス"
937 "トリームをフラッシュする。"
938
939 #. type: Plain text
940 #: build/C/man3/fflush.3:72
941 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
942 msgstr ""
943 "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこ"
944 "と。"
945
946 #. type: Plain text
947 #: build/C/man3/fflush.3:79
948 msgid ""
949 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
950 "I<errno> is set to indicate the error."
951 msgstr ""
952 "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エ"
953 "ラーに対応した値に設定される。"
954
955 #. type: Plain text
956 #: build/C/man3/fflush.3:84
957 msgid "I<Stream> is not an open stream, or is not open for writing."
958 msgstr ""
959 "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用では"
960 "ない。"
961
962 #. type: Plain text
963 #: build/C/man3/fflush.3:91
964 msgid ""
965 "The function B<fflush>()  may also fail and set I<errno> for any of the "
966 "errors specified for B<write>(2)."
967 msgstr ""
968 "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することも"
969 "ある。 この場合 I<errno> もその値に設定される。"
970
971 #. type: Plain text
972 #: build/C/man3/fflush.3:93
973 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
974 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
975
976 #.  Verified on: Solaris 8.
977 #. type: Plain text
978 #: build/C/man3/fflush.3:97
979 msgid ""
980 "The standards do not specify the behavior for input streams.  Most other "
981 "implementations behave the same as Linux."
982 msgstr ""
983 "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装"
984 "は Linux と同じ動作をする。"
985
986 #. type: Plain text
987 #: build/C/man3/fflush.3:106
988 msgid ""
989 "Note that B<fflush>()  only flushes the user space buffers provided by the C "
990 "library.  To ensure that the data is physically stored on disk the kernel "
991 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
992 msgstr ""
993 "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッ"
994 "シュしない。 データが物理的にディスクに保存されることを保証したければ、 カー"
995 "ネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や "
996 "B<fsync>(2)  を用いる。"
997
998 #. type: Plain text
999 #: build/C/man3/fflush.3:114
1000 msgid ""
1001 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1002 "(3), B<unlocked_stdio>(3)"
1003 msgstr ""
1004 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>"
1005 "(3), B<unlocked_stdio>(3)"
1006
1007 #. type: TH
1008 #: build/C/man3/fgetwc.3:16
1009 #, no-wrap
1010 msgid "FGETWC"
1011 msgstr "FGETWC"
1012
1013 #. type: TH
1014 #: build/C/man3/fgetwc.3:16 build/C/man3/fputwc.3:14
1015 #, no-wrap
1016 msgid "1999-07-25"
1017 msgstr "1999-07-25"
1018
1019 #. type: Plain text
1020 #: build/C/man3/fgetwc.3:19
1021 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1022 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1023
1024 #. type: Plain text
1025 #: build/C/man3/fgetwc.3:24 build/C/man3/fmemopen.3:18
1026 #: build/C/man3/fputwc.3:22 build/C/man3/unlocked_stdio.3:52
1027 #, no-wrap
1028 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1029 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1030
1031 #. type: Plain text
1032 #: build/C/man3/fgetwc.3:27
1033 #, no-wrap
1034 msgid ""
1035 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1036 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1037 msgstr ""
1038 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1039 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1040
1041 #. type: Plain text
1042 #: build/C/man3/fgetwc.3:42
1043 msgid ""
1044 "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>"
1045 "(3)  function.  It reads a wide character from I<stream> and returns it.  If "
1046 "the end of stream is reached, or if I<ferror(stream)> becomes true, it "
1047 "returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
1048 "I<errno> to B<EILSEQ> and returns B<WEOF>."
1049 msgstr ""
1050 "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数"
1051 "は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に"
1052 "達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返"
1053 "す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセット"
1054 "し、 B<WEOF> を返す。"
1055
1056 #. type: Plain text
1057 #: build/C/man3/fgetwc.3:50
1058 msgid ""
1059 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
1060 "may be implemented as a macro, and may evaluate its argument more than "
1061 "once.  There is no reason ever to use it."
1062 msgstr ""
1063 "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関"
1064 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
1065 "ない。この関数を使う理由はもはや存在しない。"
1066
1067 #. type: Plain text
1068 #: build/C/man3/fgetwc.3:59
1069 msgid ""
1070 "The B<fgetwc>()  function returns the next wide-character from the stream, "
1071 "or B<WEOF>."
1072 msgstr ""
1073 "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。"
1074
1075 #. type: Plain text
1076 #: build/C/man3/fgetwc.3:61 build/C/man3/fputwc.3:60
1077 msgid "Apart from the usual ones, there is"
1078 msgstr "通常のエラーに加えて、以下のエラーがある:"
1079
1080 #. type: TP
1081 #: build/C/man3/fgetwc.3:61 build/C/man3/fputwc.3:60 build/C/man3/scanf.3:556
1082 #, no-wrap
1083 msgid "B<EILSEQ>"
1084 msgstr "B<EILSEQ>"
1085
1086 #. type: Plain text
1087 #: build/C/man3/fgetwc.3:65
1088 msgid ""
1089 "The data obtained from the input stream does not form a valid character."
1090 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1091
1092 #. type: Plain text
1093 #: build/C/man3/fgetwc.3:67 build/C/man3/fputwc.3:65
1094 msgid "C99, POSIX.1-2001."
1095 msgstr "C99, POSIX.1-2001."
1096
1097 #. type: Plain text
1098 #: build/C/man3/fgetwc.3:74
1099 msgid ""
1100 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
1101 "current locale."
1102 msgstr ""
1103 "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1104
1105 #. type: Plain text
1106 #: build/C/man3/fgetwc.3:82
1107 msgid ""
1108 "In the absence of additional information passed to the B<fopen>(3)  call, it "
1109 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
1110 "sequence from the stream and then convert it to a wide character."
1111 msgstr ""
1112 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実"
1113 "際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変"
1114 "換すると期待することは適切である。"
1115
1116 #. type: Plain text
1117 #: build/C/man3/fgetwc.3:87
1118 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1119 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1120
1121 #. type: TH
1122 #: build/C/man3/flockfile.3:23
1123 #, no-wrap
1124 msgid "FLOCKFILE"
1125 msgstr "FLOCKFILE"
1126
1127 #. type: Plain text
1128 #: build/C/man3/flockfile.3:26
1129 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1130 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1131
1132 #. type: Plain text
1133 #: build/C/man3/flockfile.3:31
1134 #, no-wrap
1135 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1136 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1137
1138 #. type: Plain text
1139 #: build/C/man3/flockfile.3:33
1140 #, no-wrap
1141 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1142 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1143
1144 #. type: Plain text
1145 #: build/C/man3/flockfile.3:35
1146 #, no-wrap
1147 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1148 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1149
1150 #. type: Plain text
1151 #: build/C/man3/flockfile.3:44 build/C/man3/wprintf.3:41
1152 msgid "All functions shown above:"
1153 msgstr "上記の全ての関数:"
1154
1155 #. type: Plain text
1156 #: build/C/man3/flockfile.3:47
1157 msgid ""
1158 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1159 "|| _POSIX_SOURCE"
1160 msgstr ""
1161 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
1162 "|| _POSIX_SOURCE"
1163
1164 #. type: Plain text
1165 #: build/C/man3/flockfile.3:61
1166 msgid ""
1167 "The stdio functions are thread-safe.  This is achieved by assigning to each "
1168 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
1169 "thread.  For each library call, these functions wait until the I<FILE> "
1170 "object is no longer locked by a different thread, then lock it, do the "
1171 "requested I/O, and unlock the object again."
1172 msgstr ""
1173 "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、"
1174 "ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner "
1175 "thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標"
1176 "準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状"
1177 "態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 "
1178 "オブジェクトのロックを解除する。"
1179
1180 #. type: Plain text
1181 #: build/C/man3/flockfile.3:67
1182 msgid ""
1183 "(Note: this locking has nothing to do with the file locking done by "
1184 "functions like B<flock>(2)  and B<lockf>(3).)"
1185 msgstr ""
1186 "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは"
1187 "全く無関係である。)"
1188
1189 #. type: Plain text
1190 #: build/C/man3/flockfile.3:75
1191 msgid ""
1192 "All this is invisible to the C-programmer, but there may be two reasons to "
1193 "wish for more detailed control.  On the one hand, maybe a series of I/O "
1194 "actions by one thread belongs together, and should not be interrupted by the "
1195 "I/O of some other thread.  On the other hand, maybe the locking overhead "
1196 "should be avoided for greater efficiency."
1197 msgstr ""
1198 "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制"
1199 "御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入"
1200 "出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいとい"
1201 "うことであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを"
1202 "避ける必要があるということであろう。"
1203
1204 #. type: Plain text
1205 #: build/C/man3/flockfile.3:92
1206 msgid ""
1207 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
1208 "series of I/O actions, then unlock.  This prevents other threads from coming "
1209 "in between.  If the reason for doing this was to achieve greater efficiency, "
1210 "one does the I/O with the nonlocking versions of the stdio functions: with "
1211 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
1212 "B<putc>(3)."
1213 msgstr ""
1214 "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実"
1215 "行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他の"
1216 "スレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向"
1217 "上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともでき"
1218 "る。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や "
1219 "B<putc_unlocked>(3)  を使用する。"
1220
1221 #. type: Plain text
1222 #: build/C/man3/flockfile.3:99
1223 msgid ""
1224 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
1225 "by a different thread, then makes the current thread owner of "
1226 "I<*filehandle>, and increments the lockcount."
1227 msgstr ""
1228 "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状"
1229 "態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、"
1230 "ロック数を加算する。"
1231
1232 #. type: Plain text
1233 #: build/C/man3/flockfile.3:103
1234 msgid "The B<funlockfile>()  function decrements the lock count."
1235 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1236
1237 #. type: Plain text
1238 #: build/C/man3/flockfile.3:112
1239 msgid ""
1240 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
1241 "It does nothing in case some other thread owns I<*filehandle>, and it "
1242 "obtains ownership and increments the lockcount otherwise."
1243 msgstr ""
1244 "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョン"
1245 "である。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうで"
1246 "ない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1247
1248 #. type: Plain text
1249 #: build/C/man3/flockfile.3:117
1250 msgid ""
1251 "The B<ftrylockfile>()  function returns zero for success (the lock was "
1252 "obtained), and nonzero for failure."
1253 msgstr ""
1254 "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外"
1255 "の値を返す。"
1256
1257 #. type: Plain text
1258 #: build/C/man3/flockfile.3:119
1259 msgid "None."
1260 msgstr "なし。"
1261
1262 #. type: Plain text
1263 #: build/C/man3/flockfile.3:121 build/C/man3/popen.3:169
1264 msgid "POSIX.1-2001."
1265 msgstr "POSIX.1-2001."
1266
1267 #. type: SH
1268 #: build/C/man3/flockfile.3:121
1269 #, no-wrap
1270 msgid "AVAILABILITY"
1271 msgstr "可用性"
1272
1273 #. type: Plain text
1274 #: build/C/man3/flockfile.3:127
1275 msgid ""
1276 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
1277 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
1278 msgstr ""
1279 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用する"
1280 "ことができる。 5.1.1 以降の libc と 2.0 以降の glibc に存在する。"
1281
1282 #. type: Plain text
1283 #: build/C/man3/flockfile.3:129
1284 msgid "B<unlocked_stdio>(3)"
1285 msgstr "B<unlocked_stdio>(3)"
1286
1287 #. type: TH
1288 #: build/C/man3/fmemopen.3:6
1289 #, no-wrap
1290 msgid "FMEMOPEN"
1291 msgstr "FMEMOPEN"
1292
1293 #. type: Plain text
1294 #: build/C/man3/fmemopen.3:9
1295 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1296 msgstr ""
1297 "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープン"
1298 "する"
1299
1300 #. type: Plain text
1301 #: build/C/man3/fmemopen.3:14
1302 #, no-wrap
1303 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1304 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1305
1306 #. type: Plain text
1307 #: build/C/man3/fmemopen.3:16
1308 #, no-wrap
1309 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1310 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1311
1312 #. type: Plain text
1313 #: build/C/man3/fmemopen.3:20
1314 #, no-wrap
1315 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1316 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1317
1318 #. type: Plain text
1319 #: build/C/man3/fmemopen.3:30
1320 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1321 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1322
1323 #. type: Plain text
1324 #: build/C/man3/fmemopen.3:53
1325 msgid ""
1326 "The B<fmemopen>()  function opens a stream that permits the access specified "
1327 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
1328 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
1329 "long."
1330 msgstr ""
1331 "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指"
1332 "定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された"
1333 "文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも "
1334 "I<size> バイトの長さでなければならない。"
1335
1336 #. type: Plain text
1337 #: build/C/man3/fmemopen.3:73
1338 msgid ""
1339 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
1340 "an append mode, then the initial file position is set to the location of the "
1341 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
1342 "position is set to the start of the buffer.  Since glibc 2.9, the letter 'b' "
1343 "may be specified as the second character in I<mode>.  This provides \"binary"
1344 "\" mode: writes don't implicitly add a terminating null byte, and B<fseek>"
1345 "(3)  B<SEEK_END> is relative to the end of the buffer (i.e., the value "
1346 "specified by the I<size> argument), rather than the current string length."
1347 msgstr ""
1348 "引き数 I<mode> は B<fopen>(3)  の場合と同じである。 I<mode> で追記モード "
1349 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の最初の "
1350 "NULL バイト (\\(aq\\e0\\(aq) の位置に設定される。 それ以外の場合は、ファイル"
1351 "位置の初期値はバッファの先頭になる。 glibc 2.9 以降では、文字 'b' を I<mode> "
1352 "の二番目の文字として指定することができる。 この文字は「バイナリ」モードを指定"
1353 "するものである。 このモードでは、書き込み時に文字列終端のヌルバイトが黙って追"
1354 "加 されることはない。また、 B<fseek>(3)  B<SEEK_END> は、文字列の長さからの相"
1355 "対値ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1356
1357 #. type: Plain text
1358 #: build/C/man3/fmemopen.3:85
1359 msgid ""
1360 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1361 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1362 "there is space.  The caller should ensure that an extra byte is available in "
1363 "the buffer (and that I<size> counts that byte)  to allow for this."
1364 msgstr ""
1365 "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ "
1366 "(B<fclose>(3))  した時に、 (バッファに空きがあれば) NULL バイトがバッファの末"
1367 "尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余"
1368 "裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1369
1370 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1371 #.  and
1372 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1373 #. type: Plain text
1374 #: build/C/man3/fmemopen.3:103
1375 msgid ""
1376 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1377 "(By default, such errors will only be visible when the I<stdio> buffer is "
1378 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1379 "detect errors at the time of an output operation.  Alternatively, the caller "
1380 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1381 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1382 msgstr ""
1383 "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとな"
1384 "る。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッ"
1385 "シュされた時だけである。 I<setbuf(fp,\\ NULL)> を使ってバッファリングを無効に"
1386 "する方法は、 出力操作を行った時点でエラーを検出するのに役立つ。 別の方法とし"
1387 "ては、 I<setbuffer(fp, buf, size)> を使って、呼び出し側が明示的に stdio スト"
1388 "リームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを "
1389 "stdio に教える方法がある。)"
1390
1391 #. type: Plain text
1392 #: build/C/man3/fmemopen.3:111
1393 msgid ""
1394 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1395 "not cause read operations to return an end-of-file indication.  A read from "
1396 "the buffer will only indicate end-of-file when the file pointer advances "
1397 "I<size> bytes past the start of the buffer."
1398 msgstr ""
1399 "読み出し用にオープンされたストリームでは、 バッファ内に NULL バイト (\\(aq"
1400 "\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはな"
1401 "い。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッ"
1402 "ファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1403
1404 #. type: Plain text
1405 #: build/C/man3/fmemopen.3:126
1406 msgid ""
1407 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1408 "buffer I<size> bytes long.  This is useful for an application that wants to "
1409 "write data to a temporary buffer and then read it back again.  The buffer is "
1410 "automatically freed when the stream is closed.  Note that the caller has no "
1411 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1412 "see B<open_memstream>()  below)."
1413 msgstr ""
1414 "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長"
1415 "さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってか"
1416 "ら、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファ"
1417 "はストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関"
1418 "数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記"
1419 "の B<open_memstream>()  も参照)。"
1420
1421 #. type: Plain text
1422 #: build/C/man3/fmemopen.3:137
1423 msgid ""
1424 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1425 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1426 "automatically grows as required.  After closing the stream, the caller "
1427 "should B<free>(3)  this buffer."
1428 msgstr ""
1429 "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンす"
1430 "る。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動"
1431 "的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを "
1432 "B<free>(3)  すべきである。"
1433
1434 #. type: Plain text
1435 #: build/C/man3/fmemopen.3:152
1436 msgid ""
1437 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1438 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1439 "respectively, a pointer to the buffer and the current size of the buffer.  "
1440 "These values remain valid only as long as the caller performs no further "
1441 "output on the stream.  If further output is performed, then the stream must "
1442 "again be flushed before trying to access these variables."
1443 msgstr ""
1444 "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  "
1445 "された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサ"
1446 "イズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込み"
1447 "を 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これら"
1448 "の変数を参照する前に ストリームを再度フラッシュしなければならない。"
1449
1450 #. type: Plain text
1451 #: build/C/man3/fmemopen.3:158
1452 msgid ""
1453 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1454 "included in the size value stored at I<sizeloc>."
1455 msgstr ""
1456 "バッファ末尾の NULL バイトは保持される。 この NULL バイトは I<sizeloc> に格納"
1457 "されるサイズには「含まれない」。"
1458
1459 #. type: Plain text
1460 #: build/C/man3/fmemopen.3:166
1461 msgid ""
1462 "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>"
1463 "(3).  Moving the file position past the end of the data already written "
1464 "fills the intervening space with zeros."
1465 msgstr ""
1466 "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すで"
1467 "にデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域"
1468 "は 0 で埋められる。"
1469
1470 #. type: Plain text
1471 #: build/C/man3/fmemopen.3:172
1472 msgid ""
1473 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1474 "wide characters instead of bytes."
1475 msgstr ""
1476 "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイ"
1477 "ド文字に対して操作を行う点が異なる。"
1478
1479 #. type: Plain text
1480 #: build/C/man3/fmemopen.3:184
1481 msgid ""
1482 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1483 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1484 "and I<errno> is set to indicate the error."
1485 msgstr ""
1486 "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), "
1487 "B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返"
1488 "し、 I<errno> にエラーを示す値をセットする。"
1489
1490 #. type: SH
1491 #: build/C/man3/fmemopen.3:184 build/C/man3/fmtmsg.3:218
1492 #: build/C/man3/getline.3:130 build/C/man2/pipe.2:113 build/C/man2/readv.2:207
1493 #: build/C/man2/process_vm_readv.2:274
1494 #, no-wrap
1495 msgid "VERSIONS"
1496 msgstr "バージョン"
1497
1498 #. type: Plain text
1499 #: build/C/man3/fmemopen.3:191
1500 msgid ""
1501 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0."
1502 "x.  B<open_wmemstream>()  is available since glibc 2.4."
1503 msgstr ""
1504 "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であっ"
1505 "た。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1506
1507 #. type: Plain text
1508 #: build/C/man3/fmemopen.3:195
1509 msgid ""
1510 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1511 "not widely available on other systems."
1512 msgstr ""
1513 "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外"
1514 "のシステムで広く利用可能である。"
1515
1516 #. type: Plain text
1517 #: build/C/man3/fmemopen.3:201
1518 msgid ""
1519 "There is no file descriptor associated with the file stream returned by "
1520 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1521 "returned stream)."
1522 msgstr ""
1523 "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない "
1524 "(つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返るこ"
1525 "とになる)。"
1526
1527 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1528 #. type: Plain text
1529 #: build/C/man3/fmemopen.3:208
1530 msgid ""
1531 "In glibc before version 2.7, seeking past the end of a stream created by "
1532 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1533 "call fails, returning -1."
1534 msgstr ""
1535 "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたスト"
1536 "リームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 "
1537 "B<fseek>(3)  が失敗し -1 が返る。"
1538
1539 #. type: SH
1540 #: build/C/man3/fmemopen.3:208 build/C/man3/fmtmsg.3:240
1541 #: build/C/man3/fopencookie.3:244 build/C/man3/getline.3:139
1542 #: build/C/man2/pipe.2:124 build/C/man3/printf.3:974
1543 #: build/C/man2/readlink.2:155 build/C/man2/readv.2:263
1544 #: build/C/man2/process_vm_readv.2:293
1545 #, no-wrap
1546 msgid "EXAMPLE"
1547 msgstr "例"
1548
1549 #. type: Plain text
1550 #: build/C/man3/fmemopen.3:218
1551 msgid ""
1552 "The program below uses B<fmemopen>()  to open an input buffer, and "
1553 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1554 "scans its input string (taken from the program's first command-line "
1555 "argument) reading integers, and writes the squares of these integers to the "
1556 "output buffer.  An example of the output produced by this program is the "
1557 "following:"
1558 msgstr ""
1559 "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 "
1560 "B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンして"
1561 "いる。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャン"
1562 "して整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラ"
1563 "ムの実行例は以下のようになる。"
1564
1565 #. type: Plain text
1566 #: build/C/man3/fmemopen.3:223
1567 #, no-wrap
1568 msgid ""
1569 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1570 "size=11; ptr=1 529 1849\n"
1571 msgstr ""
1572 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1573 "size=11; ptr=1 529 1849\n"
1574
1575 #. type: SS
1576 #: build/C/man3/fmemopen.3:225 build/C/man3/fopencookie.3:268
1577 #, no-wrap
1578 msgid "Program source"
1579 msgstr "プログラムのソース"
1580
1581 #. type: Plain text
1582 #: build/C/man3/fmemopen.3:232
1583 #, no-wrap
1584 msgid ""
1585 "#define _GNU_SOURCE\n"
1586 "#include E<lt>string.hE<gt>\n"
1587 "#include E<lt>stdio.hE<gt>\n"
1588 "#include E<lt>stdlib.hE<gt>\n"
1589 msgstr ""
1590 "#define _GNU_SOURCE\n"
1591 "#include E<lt>string.hE<gt>\n"
1592 "#include E<lt>stdio.hE<gt>\n"
1593 "#include E<lt>stdlib.hE<gt>\n"
1594
1595 #. type: Plain text
1596 #: build/C/man3/fmemopen.3:235
1597 #, no-wrap
1598 msgid ""
1599 "#define handle_error(msg) \\e\n"
1600 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1601 msgstr ""
1602 "#define handle_error(msg) \\e\n"
1603 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1604
1605 #. type: Plain text
1606 #: build/C/man3/fmemopen.3:243
1607 #, no-wrap
1608 msgid ""
1609 "int\n"
1610 "main(int argc, char *argv[])\n"
1611 "{\n"
1612 "    FILE *out, *in;\n"
1613 "    int v, s;\n"
1614 "    size_t size;\n"
1615 "    char *ptr;\n"
1616 msgstr ""
1617 "int\n"
1618 "main(int argc, char *argv[])\n"
1619 "{\n"
1620 "    FILE *out, *in;\n"
1621 "    int v, s;\n"
1622 "    size_t size;\n"
1623 "    char *ptr;\n"
1624
1625 #. type: Plain text
1626 #: build/C/man3/fmemopen.3:248
1627 #, no-wrap
1628 msgid ""
1629 "    if (argc != 2) {\n"
1630 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1631 "\texit(EXIT_FAILURE);\n"
1632 "    }\n"
1633 msgstr ""
1634 "    if (argc != 2) {\n"
1635 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1636 "\texit(EXIT_FAILURE);\n"
1637 "    }\n"
1638
1639 #. type: Plain text
1640 #: build/C/man3/fmemopen.3:252
1641 #, no-wrap
1642 msgid ""
1643 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1644 "    if (in == NULL)\n"
1645 "        handle_error(\"fmemopen\");\n"
1646 msgstr ""
1647 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1648 "    if (in == NULL)\n"
1649 "        handle_error(\"fmemopen\");\n"
1650
1651 #. type: Plain text
1652 #: build/C/man3/fmemopen.3:256
1653 #, no-wrap
1654 msgid ""
1655 "    out = open_memstream(&ptr, &size);\n"
1656 "    if (out == NULL)\n"
1657 "        handle_error(\"open_memstream\");\n"
1658 msgstr ""
1659 "    out = open_memstream(&ptr, &size);\n"
1660 "    if (out == NULL)\n"
1661 "        handle_error(\"open_memstream\");\n"
1662
1663 #. type: Plain text
1664 #: build/C/man3/fmemopen.3:261
1665 #, no-wrap
1666 msgid ""
1667 "    for (;;) {\n"
1668 "        s = fscanf(in, \"%d\", &v);\n"
1669 "        if (s E<lt>= 0)\n"
1670 "            break;\n"
1671 msgstr ""
1672 "    for (;;) {\n"
1673 "        s = fscanf(in, \"%d\", &v);\n"
1674 "        if (s E<lt>= 0)\n"
1675 "            break;\n"
1676
1677 #. type: Plain text
1678 #: build/C/man3/fmemopen.3:272
1679 #, no-wrap
1680 msgid ""
1681 "        s = fprintf(out, \"%d \", v * v);\n"
1682 "        if (s == -1)\n"
1683 "            handle_error(\"fprintf\");\n"
1684 "    }\n"
1685 "    fclose(in);\n"
1686 "    fclose(out);\n"
1687 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1688 "    free(ptr);\n"
1689 "    exit(EXIT_SUCCESS);\n"
1690 "}\n"
1691 msgstr ""
1692 "        s = fprintf(out, \"%d \", v * v);\n"
1693 "        if (s == -1)\n"
1694 "            handle_error(\"fprintf\");\n"
1695 "    }\n"
1696 "    fclose(in);\n"
1697 "    fclose(out);\n"
1698 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1699 "    free(ptr);\n"
1700 "    exit(EXIT_SUCCESS);\n"
1701 "}\n"
1702
1703 #. type: Plain text
1704 #: build/C/man3/fmemopen.3:276
1705 msgid "B<fopen>(3), B<fopencookie>(3)"
1706 msgstr "B<fopen>(3), B<fopencookie>(3)"
1707
1708 #. type: TH
1709 #: build/C/man3/fmtmsg.3:9
1710 #, no-wrap
1711 msgid "FMTMSG"
1712 msgstr "FMTMSG"
1713
1714 #. type: TH
1715 #: build/C/man3/fmtmsg.3:9
1716 #, no-wrap
1717 msgid "2008-06-14"
1718 msgstr "2008-06-14"
1719
1720 #. type: Plain text
1721 #: build/C/man3/fmtmsg.3:12
1722 msgid "fmtmsg - print formatted error messages"
1723 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1724
1725 #. type: Plain text
1726 #: build/C/man3/fmtmsg.3:15
1727 #, no-wrap
1728 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1729 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1730
1731 #. type: Plain text
1732 #: build/C/man3/fmtmsg.3:17
1733 #, no-wrap
1734 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1735 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1736
1737 #. type: Plain text
1738 #: build/C/man3/fmtmsg.3:19
1739 #, no-wrap
1740 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1741 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1742
1743 #. type: Plain text
1744 #: build/C/man3/fmtmsg.3:21
1745 #, no-wrap
1746 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1747 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1748
1749 #. type: Plain text
1750 #: build/C/man3/fmtmsg.3:32
1751 msgid ""
1752 "This function displays a message described by its arguments on the device"
1753 "(s)  specified in the I<classification> argument.  For messages written to "
1754 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1755 msgstr ""
1756 "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定さ"
1757 "れたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマット"
1758 "は、 B<MSGVERB> 環境変数に依存する。"
1759
1760 #. type: Plain text
1761 #: build/C/man3/fmtmsg.3:39
1762 msgid ""
1763 "The I<label> argument identifies the source of the message.  The string must "
1764 "consist of two colon separated parts where the first part has not more than "
1765 "10 and the second part not more than 14 characters."
1766 msgstr ""
1767 "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られ"
1768 "た 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内で"
1769 "なければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1770
1771 #. type: Plain text
1772 #: build/C/man3/fmtmsg.3:43
1773 msgid "The I<text> argument describes the condition of the error."
1774 msgstr "I<text> 引き数にはエラー条件を記述する。"
1775
1776 #. type: Plain text
1777 #: build/C/man3/fmtmsg.3:48
1778 msgid ""
1779 "The I<action> argument describes possible steps to recover from the error.  "
1780 "If it is printed, it is prefixed by \"TO FIX: \"."
1781 msgstr ""
1782 "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 こ"
1783 "れが表示される場合、\"TO FIX: \" が前に付く。"
1784
1785 #. type: Plain text
1786 #: build/C/man3/fmtmsg.3:56
1787 msgid ""
1788 "The I<tag> argument is a reference to the online documentation where more "
1789 "information can be found.  It should contain the I<label> value and a unique "
1790 "identification number."
1791 msgstr ""
1792 "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照で"
1793 "ある。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1794
1795 #. type: SS
1796 #: build/C/man3/fmtmsg.3:56
1797 #, no-wrap
1798 msgid "Dummy arguments"
1799 msgstr "ダミー引き数"
1800
1801 #. type: Plain text
1802 #: build/C/man3/fmtmsg.3:75
1803 msgid ""
1804 "Each of the arguments can have a dummy value.  The dummy classification "
1805 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1806 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1807 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1808 "synonyms for I<((char *) 0)>, the empty string, and B<MM_NULLSEV> is a "
1809 "synonym for B<NO_SEV>."
1810 msgstr ""
1811 "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 "
1812 "B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミー"
1813 "の I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを"
1814 "表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<"
1815 "((char *) 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名であ"
1816 "る。"
1817
1818 #. type: SS
1819 #: build/C/man3/fmtmsg.3:75
1820 #, no-wrap
1821 msgid "The classification argument"
1822 msgstr "classification 引き数"
1823
1824 #. type: Plain text
1825 #: build/C/man3/fmtmsg.3:79
1826 msgid ""
1827 "The I<classification> argument is the sum of values describing 4 types of "
1828 "information."
1829 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1830
1831 #. type: Plain text
1832 #: build/C/man3/fmtmsg.3:82
1833 msgid "The first value defines the output channel."
1834 msgstr "最初の値は出力チャンネルを定義する。"
1835
1836 #. type: TP
1837 #: build/C/man3/fmtmsg.3:82
1838 #, no-wrap
1839 msgid "B<MM_PRINT>"
1840 msgstr "B<MM_PRINT>"
1841
1842 #. type: Plain text
1843 #: build/C/man3/fmtmsg.3:86
1844 msgid "Output to I<stderr>."
1845 msgstr "I<stderr> に出力する。"
1846
1847 #. type: TP
1848 #: build/C/man3/fmtmsg.3:86
1849 #, no-wrap
1850 msgid "B<MM_CONSOLE>"
1851 msgstr "B<MM_CONSOLE>"
1852
1853 #. type: Plain text
1854 #: build/C/man3/fmtmsg.3:89
1855 msgid "Output to the system console."
1856 msgstr "システムコンソールに出力する。"
1857
1858 #. type: TP
1859 #: build/C/man3/fmtmsg.3:89
1860 #, no-wrap
1861 msgid "B<MM_PRINT | MM_CONSOLE>"
1862 msgstr "B<MM_PRINT | MM_CONSOLE>"
1863
1864 #. type: Plain text
1865 #: build/C/man3/fmtmsg.3:92
1866 msgid "Output to both."
1867 msgstr "両方に出力する。"
1868
1869 #. type: Plain text
1870 #: build/C/man3/fmtmsg.3:94
1871 msgid "The second value is the source of the error:"
1872 msgstr "2 番目の値はエラーの発生源である:"
1873
1874 #. type: TP
1875 #: build/C/man3/fmtmsg.3:94
1876 #, no-wrap
1877 msgid "B<MM_HARD>"
1878 msgstr "B<MM_HARD>"
1879
1880 #. type: Plain text
1881 #: build/C/man3/fmtmsg.3:97
1882 msgid "A hardware error occurred."
1883 msgstr "ハードウェアエラーが起こった。"
1884
1885 #. type: TP
1886 #: build/C/man3/fmtmsg.3:97
1887 #, no-wrap
1888 msgid "B<MM_FIRM>"
1889 msgstr "B<MM_FIRM>"
1890
1891 #. type: Plain text
1892 #: build/C/man3/fmtmsg.3:100
1893 msgid "A firmware error occurred."
1894 msgstr "ファームウェアエラーが起こった。"
1895
1896 #. type: TP
1897 #: build/C/man3/fmtmsg.3:100
1898 #, no-wrap
1899 msgid "B<MM_SOFT>"
1900 msgstr "B<MM_SOFT>"
1901
1902 #. type: Plain text
1903 #: build/C/man3/fmtmsg.3:103
1904 msgid "A software error occurred."
1905 msgstr "ソフトウェアエラーが起こった。"
1906
1907 #. type: Plain text
1908 #: build/C/man3/fmtmsg.3:105
1909 msgid "The third value encodes the detector of the problem:"
1910 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
1911
1912 #. type: TP
1913 #: build/C/man3/fmtmsg.3:105
1914 #, no-wrap
1915 msgid "B<MM_APPL>"
1916 msgstr "B<MM_APPL>"
1917
1918 #. type: Plain text
1919 #: build/C/man3/fmtmsg.3:108
1920 msgid "It is detected by an application."
1921 msgstr "アプリケーションによって検知された。"
1922
1923 #. type: TP
1924 #: build/C/man3/fmtmsg.3:108
1925 #, no-wrap
1926 msgid "B<MM_UTIL>"
1927 msgstr "B<MM_UTIL>"
1928
1929 #. type: Plain text
1930 #: build/C/man3/fmtmsg.3:111
1931 msgid "It is detected by a utility."
1932 msgstr "ユーティリティによって検知された。"
1933
1934 #. type: TP
1935 #: build/C/man3/fmtmsg.3:111
1936 #, no-wrap
1937 msgid "B<MM_OPSYS>"
1938 msgstr "B<MM_OPSYS>"
1939
1940 #. type: Plain text
1941 #: build/C/man3/fmtmsg.3:114
1942 msgid "It is detected by the operating system."
1943 msgstr "オペレーティングシステムによって検知された。"
1944
1945 #. type: Plain text
1946 #: build/C/man3/fmtmsg.3:116
1947 msgid "The fourth value shows the severity of the incident:"
1948 msgstr "4 番目の値は問題の重大度を表す:"
1949
1950 #. type: TP
1951 #: build/C/man3/fmtmsg.3:116
1952 #, no-wrap
1953 msgid "B<MM_RECOVER>"
1954 msgstr "B<MM_RECOVER>"
1955
1956 #. type: Plain text
1957 #: build/C/man3/fmtmsg.3:119
1958 msgid "It is a recoverable error."
1959 msgstr "回復可能なエラーである。"
1960
1961 #. type: TP
1962 #: build/C/man3/fmtmsg.3:119
1963 #, no-wrap
1964 msgid "B<MM_NRECOV>"
1965 msgstr "B<MM_NRECOV>"
1966
1967 #. type: Plain text
1968 #: build/C/man3/fmtmsg.3:122
1969 msgid "It is a nonrecoverable error."
1970 msgstr "回復不可能なエラーである。"
1971
1972 #. type: SS
1973 #: build/C/man3/fmtmsg.3:122
1974 #, no-wrap
1975 msgid "The severity argument"
1976 msgstr "severity 引き数"
1977
1978 #. type: Plain text
1979 #: build/C/man3/fmtmsg.3:126
1980 msgid "The I<severity> argument can take one of the following values:"
1981 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
1982
1983 #. type: TP
1984 #: build/C/man3/fmtmsg.3:126
1985 #, no-wrap
1986 msgid "B<MM_NOSEV>"
1987 msgstr "B<MM_NOSEV>"
1988
1989 #. type: Plain text
1990 #: build/C/man3/fmtmsg.3:129
1991 msgid "No severity is printed."
1992 msgstr "重大度は表示されない。"
1993
1994 #. type: TP
1995 #: build/C/man3/fmtmsg.3:129
1996 #, no-wrap
1997 msgid "B<MM_HALT>"
1998 msgstr "B<MM_HALT>"
1999
2000 #. type: Plain text
2001 #: build/C/man3/fmtmsg.3:132
2002 msgid "This value is printed as HALT."
2003 msgstr "この値は HALT として表示される。"
2004
2005 #. type: TP
2006 #: build/C/man3/fmtmsg.3:132
2007 #, no-wrap
2008 msgid "B<MM_ERROR>"
2009 msgstr "B<MM_ERROR>"
2010
2011 #. type: Plain text
2012 #: build/C/man3/fmtmsg.3:135
2013 msgid "This value is printed as ERROR."
2014 msgstr "この値は ERROR として表示される。"
2015
2016 #. type: TP
2017 #: build/C/man3/fmtmsg.3:135
2018 #, no-wrap
2019 msgid "B<MM_WARNING>"
2020 msgstr "B<MM_WARNING>"
2021
2022 #. type: Plain text
2023 #: build/C/man3/fmtmsg.3:138
2024 msgid "This value is printed as WARNING."
2025 msgstr "この値は WARNING として表示される。"
2026
2027 #. type: TP
2028 #: build/C/man3/fmtmsg.3:138
2029 #, no-wrap
2030 msgid "B<MM_INFO>"
2031 msgstr "B<MM_INFO>"
2032
2033 #. type: Plain text
2034 #: build/C/man3/fmtmsg.3:141
2035 msgid "This value is printed as INFO."
2036 msgstr "この値は INFO として表示される。"
2037
2038 #. type: Plain text
2039 #: build/C/man3/fmtmsg.3:148
2040 msgid ""
2041 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
2042 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
2043 "print."
2044 msgstr ""
2045 "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 "
2046 "B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
2047
2048 #. type: Plain text
2049 #: build/C/man3/fmtmsg.3:150
2050 msgid "The function can return 4 values:"
2051 msgstr "関数は 4 つの値を返す:"
2052
2053 #. type: TP
2054 #: build/C/man3/fmtmsg.3:150
2055 #, no-wrap
2056 msgid "B<MM_OK>"
2057 msgstr "B<MM_OK>"
2058
2059 #. type: Plain text
2060 #: build/C/man3/fmtmsg.3:153
2061 msgid "Everything went smooth."
2062 msgstr "全てがうまくいった。"
2063
2064 #. type: TP
2065 #: build/C/man3/fmtmsg.3:153
2066 #, no-wrap
2067 msgid "B<MM_NOTOK>"
2068 msgstr "B<MM_NOTOK>"
2069
2070 #. type: Plain text
2071 #: build/C/man3/fmtmsg.3:156
2072 msgid "Complete failure."
2073 msgstr "完全に失敗した。"
2074
2075 #. type: TP
2076 #: build/C/man3/fmtmsg.3:156
2077 #, no-wrap
2078 msgid "B<MM_NOMSG>"
2079 msgstr "B<MM_NOMSG>"
2080
2081 #. type: Plain text
2082 #: build/C/man3/fmtmsg.3:160
2083 msgid "Error writing to I<stderr>."
2084 msgstr "I<stderr> に書き込むときにエラーが起こった。"
2085
2086 #. type: TP
2087 #: build/C/man3/fmtmsg.3:160
2088 #, no-wrap
2089 msgid "B<MM_NOCON>"
2090 msgstr "B<MM_NOCON>"
2091
2092 #. type: Plain text
2093 #: build/C/man3/fmtmsg.3:163
2094 msgid "Error writing to the console."
2095 msgstr "コンソールに書き込むときにエラーが起こった。"
2096
2097 #. type: SH
2098 #: build/C/man3/fmtmsg.3:163
2099 #, no-wrap
2100 msgid "ENVIRONMENT"
2101 msgstr "環境変数"
2102
2103 #. type: Plain text
2104 #: build/C/man3/fmtmsg.3:174
2105 msgid ""
2106 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
2107 "suppress parts of the output to I<stderr>.  (It does not influence output to "
2108 "the console.)  When this variable is defined, is non-NULL, and is a colon-"
2109 "separated list of valid keywords, then only the parts of the message "
2110 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
2111 "\"severity\", \"text\", \"action\" and \"tag\"."
2112 msgstr ""
2113 "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制"
2114 "するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定"
2115 "義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場"
2116 "合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワード"
2117 "は \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
2118
2119 #. type: Plain text
2120 #: build/C/man3/fmtmsg.3:186
2121 msgid ""
2122 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
2123 "levels.  By default, only the five severity levels described above are "
2124 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
2125 "If the user puts B<SEV_LEVEL> with a format like"
2126 msgstr ""
2127 "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォル"
2128 "トでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 "
2129 "B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが "
2130 "B<SEV_LEVEL> を"
2131
2132 #. type: Plain text
2133 #: build/C/man3/fmtmsg.3:189
2134 msgid "SEV_LEVEL=[description[:description[:...]]]"
2135 msgstr "SEV_LEVEL=[description[:description[:...]]]"
2136
2137 #. type: Plain text
2138 #: build/C/man3/fmtmsg.3:194
2139 msgid ""
2140 "in the environment of the process before the first call to B<fmtmsg>(), "
2141 "where each description is of the form"
2142 msgstr ""
2143 "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 "
2144 "に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると"
2145 "指定された printstring を表示する。 各 description は"
2146
2147 #. type: Plain text
2148 #: build/C/man3/fmtmsg.3:197
2149 msgid "severity-keyword,level,printstring"
2150 msgstr "severity-keyword,level,printstring"
2151
2152 #. type: Plain text
2153 #: build/C/man3/fmtmsg.3:204
2154 msgid ""
2155 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
2156 "addition to the standard levels 0-4), and use the indicated printstring when "
2157 "such a level occurs."
2158 msgstr "という形式である。"
2159
2160 #. type: Plain text
2161 #: build/C/man3/fmtmsg.3:218
2162 msgid ""
2163 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
2164 "present.  The level part is a string representation of a number.  The "
2165 "numeric value must be a number greater than 4.  This value must be used in "
2166 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
2167 "possible to overwrite any of the predefined classes.  The printstring is the "
2168 "string printed when a message of this class is processed by B<fmtmsg>()."
2169 msgstr ""
2170 "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならな"
2171 "い。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなけれ"
2172 "ばならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければなら"
2173 "ず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできな"
2174 "い。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成され"
2175 "た場合に表示される文字列である。"
2176
2177 #. type: Plain text
2178 #: build/C/man3/fmtmsg.3:221
2179 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
2180 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
2181
2182 #. type: Plain text
2183 #: build/C/man3/fmtmsg.3:236
2184 msgid ""
2185 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
2186 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
2187 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
2188 msgstr ""
2189 "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と "
2190 "B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 "
2191 "B<MSGVERB> は POSIX.1-2001 に記述されている。"
2192
2193 #. type: Plain text
2194 #: build/C/man3/fmtmsg.3:240
2195 msgid ""
2196 "System V and UnixWare man pages tell us that these functions have been "
2197 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
2198 "vlfmt()\", and will be removed later."
2199 msgstr ""
2200 "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev"
2201 "()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来"
2202 "は削除される予定である」と書かれている。"
2203
2204 #. type: Plain text
2205 #: build/C/man3/fmtmsg.3:245
2206 #, no-wrap
2207 msgid ""
2208 "#include E<lt>stdio.hE<gt>\n"
2209 "#include E<lt>stdlib.hE<gt>\n"
2210 "#include E<lt>fmtmsg.hE<gt>\n"
2211 msgstr ""
2212 "#include E<lt>stdio.hE<gt>\n"
2213 "#include E<lt>stdlib.hE<gt>\n"
2214 "#include E<lt>fmtmsg.hE<gt>\n"
2215
2216 #. type: Plain text
2217 #: build/C/man3/fmtmsg.3:251
2218 #, no-wrap
2219 msgid ""
2220 "int\n"
2221 "main(void)\n"
2222 "{\n"
2223 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2224 "    int err;\n"
2225 msgstr ""
2226 "int\n"
2227 "main(void)\n"
2228 "{\n"
2229 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2230 "    int err;\n"
2231
2232 #. type: Plain text
2233 #: build/C/man3/fmtmsg.3:272
2234 #, no-wrap
2235 msgid ""
2236 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2237 "                \"unknown mount option\", \"See mount(8).\",\n"
2238 "                \"util-linux:mount:017\");\n"
2239 "    switch (err) {\n"
2240 "    case MM_OK:\n"
2241 "        break;\n"
2242 "    case MM_NOTOK:\n"
2243 "        printf(\"Nothing printed\\en\");\n"
2244 "        break;\n"
2245 "    case MM_NOMSG:\n"
2246 "        printf(\"Nothing printed to stderr\\en\");\n"
2247 "        break;\n"
2248 "    case MM_NOCON:\n"
2249 "        printf(\"No console output\\en\");\n"
2250 "        break;\n"
2251 "    default:\n"
2252 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2253 "    }\n"
2254 "    exit(EXIT_SUCCESS);\n"
2255 "}\n"
2256 msgstr ""
2257 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2258 "                \"unknown mount option\", \"See mount(8).\",\n"
2259 "                \"util-linux:mount:017\");\n"
2260 "    switch (err) {\n"
2261 "    case MM_OK:\n"
2262 "      break;\n"
2263 "    case MM_NOTOK:\n"
2264 "        printf(\"Nothing printed\\en\");\n"
2265 "        break;\n"
2266 "    case MM_NOMSG:\n"
2267 "        printf(\"Nothing printed to stderr\\en\");\n"
2268 "        break;\n"
2269 "    case MM_NOCON:\n"
2270 "        printf(\"No console output\\en\");\n"
2271 "        break;\n"
2272 "    default:\n"
2273 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2274 "    }\n"
2275 "    exit(EXIT_SUCCESS);\n"
2276 "}\n"
2277
2278 #. type: Plain text
2279 #: build/C/man3/fmtmsg.3:275
2280 msgid "The output should be:"
2281 msgstr "出力は"
2282
2283 #. type: Plain text
2284 #: build/C/man3/fmtmsg.3:279
2285 #, no-wrap
2286 msgid ""
2287 "    util-linux:mount: ERROR: unknown mount option\n"
2288 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2289 msgstr ""
2290 "    util-linux:mount: ERROR: unknown mount option\n"
2291 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2292
2293 #. type: Plain text
2294 #: build/C/man3/fmtmsg.3:282
2295 msgid "and after"
2296 msgstr "のようになり、"
2297
2298 #. type: Plain text
2299 #: build/C/man3/fmtmsg.3:285
2300 #, no-wrap
2301 msgid "    MSGVERB=text:action; export MSGVERB\n"
2302 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2303
2304 #. type: Plain text
2305 #: build/C/man3/fmtmsg.3:288
2306 msgid "the output becomes:"
2307 msgstr "を実行すると、次のようになる。"
2308
2309 #. type: Plain text
2310 #: build/C/man3/fmtmsg.3:292
2311 #, no-wrap
2312 msgid ""
2313 "    unknown mount option\n"
2314 "    TO FIX: See mount(8).\n"
2315 msgstr ""
2316 "    unknown mount option\n"
2317 "    TO FIX: See mount(8).\n"
2318
2319 #. type: Plain text
2320 #: build/C/man3/fmtmsg.3:296
2321 msgid "B<addseverity>(3), B<perror>(3)"
2322 msgstr "B<addseverity>(3), B<perror>(3)"
2323
2324 #. type: TH
2325 #: build/C/man3/fopen.3:42
2326 #, no-wrap
2327 msgid "FOPEN"
2328 msgstr "FOPEN"
2329
2330 #. type: TH
2331 #: build/C/man3/fopen.3:42
2332 #, no-wrap
2333 msgid "2012-04-22"
2334 msgstr "2012-04-22"
2335
2336 #. type: Plain text
2337 #: build/C/man3/fopen.3:45
2338 msgid "fopen, fdopen, freopen - stream open functions"
2339 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2340
2341 #. type: Plain text
2342 #: build/C/man3/fopen.3:50
2343 #, no-wrap
2344 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2345 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2346
2347 #. type: Plain text
2348 #: build/C/man3/fopen.3:52
2349 #, no-wrap
2350 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2351 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2352
2353 #. type: Plain text
2354 #: build/C/man3/fopen.3:54
2355 #, no-wrap
2356 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2357 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2358
2359 #. type: Plain text
2360 #: build/C/man3/fopen.3:63
2361 msgid ""
2362 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2363 msgstr ""
2364 "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2365
2366 #. type: Plain text
2367 #: build/C/man3/fopen.3:69
2368 msgid ""
2369 "The B<fopen>()  function opens the file whose name is the string pointed to "
2370 "by I<path> and associates a stream with it."
2371 msgstr ""
2372 "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結"
2373 "びつける。"
2374
2375 #. type: Plain text
2376 #: build/C/man3/fopen.3:74
2377 msgid ""
2378 "The argument I<mode> points to a string beginning with one of the following "
2379 "sequences (possibly followed by additional characters, as described below):"
2380 msgstr ""
2381 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2382 "る (以下の述べる、追加の文字が後に続くこともある):"
2383
2384 #. type: TP
2385 #: build/C/man3/fopen.3:74
2386 #, no-wrap
2387 msgid "B<r>"
2388 msgstr "B<r>"
2389
2390 #. type: Plain text
2391 #: build/C/man3/fopen.3:78
2392 msgid ""
2393 "Open text file for reading.  The stream is positioned at the beginning of "
2394 "the file."
2395 msgstr ""
2396 "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置され"
2397 "る。"
2398
2399 #. type: TP
2400 #: build/C/man3/fopen.3:78
2401 #, no-wrap
2402 msgid "B<r+>"
2403 msgstr "B<r+>"
2404
2405 #. type: Plain text
2406 #: build/C/man3/fopen.3:82
2407 msgid ""
2408 "Open for reading and writing.  The stream is positioned at the beginning of "
2409 "the file."
2410 msgstr ""
2411 "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置され"
2412 "る。"
2413
2414 #. type: TP
2415 #: build/C/man3/fopen.3:82
2416 #, no-wrap
2417 msgid "B<w>"
2418 msgstr "B<w>"
2419
2420 #. type: Plain text
2421 #: build/C/man3/fopen.3:86
2422 msgid ""
2423 "Truncate file to zero length or create text file for writing.  The stream is "
2424 "positioned at the beginning of the file."
2425 msgstr ""
2426 "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り"
2427 "詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先"
2428 "頭に位置される。"
2429
2430 #. type: TP
2431 #: build/C/man3/fopen.3:86
2432 #, no-wrap
2433 msgid "B<w+>"
2434 msgstr "B<w+>"
2435
2436 #. type: Plain text
2437 #: build/C/man3/fopen.3:92
2438 msgid ""
2439 "Open for reading and writing.  The file is created if it does not exist, "
2440 "otherwise it is truncated.  The stream is positioned at the beginning of the "
2441 "file."
2442 msgstr ""
2443 "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作"
2444 "成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイル"
2445 "の先頭に位置される。"
2446
2447 #. type: TP
2448 #: build/C/man3/fopen.3:92 build/C/man3/scanf.3:444
2449 #, no-wrap
2450 msgid "B<a>"
2451 msgstr "B<a>"
2452
2453 #. type: Plain text
2454 #: build/C/man3/fopen.3:97
2455 msgid ""
2456 "Open for appending (writing at end of file).  The file is created if it does "
2457 "not exist.  The stream is positioned at the end of the file."
2458 msgstr ""
2459 "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合に"
2460 "は新たに作成する。 ストリームはファイルの最後に位置される。"
2461
2462 #. type: TP
2463 #: build/C/man3/fopen.3:97
2464 #, no-wrap
2465 msgid "B<a+>"
2466 msgstr "B<a+>"
2467
2468 #. type: Plain text
2469 #: build/C/man3/fopen.3:103
2470 msgid ""
2471 "Open for reading and appending (writing at end of file).  The file is "
2472 "created if it does not exist.  The initial file position for reading is at "
2473 "the beginning of the file, but output is always appended to the end of the "
2474 "file."
2475 msgstr ""
2476 "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在し"
2477 "ていない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭で"
2478 "あるが、 書き込みは常にファイルの最後に追加される。"
2479
2480 #. type: Plain text
2481 #: build/C/man3/fopen.3:116
2482 msgid ""
2483 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2484 "character or as a character between the characters in any of the two-"
2485 "character strings described above.  This is strictly for compatibility with "
2486 "C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming "
2487 "systems, including Linux.  (Other systems may treat text files and binary "
2488 "files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/"
2489 "O to a binary file and expect that your program may be ported to non-UNIX "
2490 "environments.)"
2491 msgstr ""
2492 "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列"
2493 "の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の"
2494 "間に指定することもできる。 これは C89 との互換性のためだけに用意された もので"
2495 "あり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全て"
2496 "の POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステム"
2497 "ではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナ"
2498 "リファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測する"
2499 "なら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2500
2501 #. type: Plain text
2502 #: build/C/man3/fopen.3:119
2503 msgid "See NOTES below for details of glibc extensions for I<mode>."
2504 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2505
2506 #. type: Plain text
2507 #: build/C/man3/fopen.3:124
2508 msgid ""
2509 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2510 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2511 "umask value (see B<umask>(2))."
2512 msgstr ""
2513 "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2514 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask "
2515 "値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2516
2517 #. type: Plain text
2518 #: build/C/man3/fopen.3:139
2519 msgid ""
2520 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2521 "that ANSI C requires that a file positioning function intervene between "
2522 "output and input, unless an input operation encounters end-of-file.  (If "
2523 "this condition is not met, then a read is allowed to return the result of "
2524 "writes other than the most recent.)  Therefore it is good practice (and "
2525 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>"
2526 "(3)  operation between write and read operations on such a stream.  This "
2527 "operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called "
2528 "for its synchronizing side effect."
2529 msgstr ""
2530 "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができ"
2531 "る。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  "
2532 "出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになってい"
2533 "ることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書"
2534 "き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 した"
2535 "がって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または "
2536 "B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることも"
2537 "ときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば "
2538 "I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良"
2539 "い)。"
2540
2541 #. type: Plain text
2542 #: build/C/man3/fopen.3:144
2543 msgid ""
2544 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2545 "causes all subsequent write operations to this stream to occur at end-of-"
2546 "file, as if preceded the call:"
2547 msgstr ""
2548 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2549 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2550 "かのように) ファイルの末尾で行われる。"
2551
2552 #. type: Plain text
2553 #: build/C/man3/fopen.3:147
2554 #, no-wrap
2555 msgid "    fseek(stream,0,SEEK_END);\n"
2556 msgstr "    fseek(stream,0,SEEK_END);\n"
2557
2558 #. type: Plain text
2559 #: build/C/man3/fopen.3:169
2560 msgid ""
2561 "The B<fdopen>()  function associates a stream with the existing file "
2562 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+"
2563 "\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the "
2564 "file descriptor.  The file position indicator of the new stream is set to "
2565 "that belonging to I<fd>, and the error and end-of-file indicators are "
2566 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2567 "file descriptor is not dup'ed, and will be closed when the stream created by "
2568 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2569 "memory object is undefined."
2570 msgstr ""
2571 "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ス"
2572 "トリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) "
2573 "は ファイル記述子のモードと互換のものでなければならない。 新しいストリームの"
2574 "ファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file "
2575 "の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは"
2576 "行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたス"
2577 "トリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェ"
2578 "クトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2579
2580 #. type: Plain text
2581 #: build/C/man3/fopen.3:187
2582 msgid ""
2583 "The B<freopen>()  function opens the file whose name is the string pointed "
2584 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2585 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2586 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2587 "function is to change the file associated with a standard text stream "
2588 "(I<stderr>, I<stdin>, or I<stdout>)."
2589 msgstr ""
2590 "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で"
2591 "指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存"
2592 "在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われ"
2593 "る。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, "
2594 "I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2595
2596 #. type: Plain text
2597 #: build/C/man3/fopen.3:199
2598 msgid ""
2599 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2600 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2601 "indicate the error."
2602 msgstr ""
2603 "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返"
2604 "す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2605
2606 #. type: TP
2607 #: build/C/man3/fopen.3:200 build/C/man3/fseek.3:138
2608 #: build/C/man3/getline.3:121 build/C/man2/llseek.2:72
2609 #: build/C/man2/lseek.2:164 build/C/man2/pipe.2:102 build/C/man2/read.2:108
2610 #: build/C/man2/read.2:119 build/C/man2/readlink.2:93
2611 #: build/C/man2/readlink.2:102 build/C/man2/readv.2:198
2612 #: build/C/man2/rename.2:136 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:563
2613 #: build/C/man2/write.2:148 build/C/man2/process_vm_readv.2:228
2614 #: build/C/man2/process_vm_readv.2:239 build/C/man2/process_vm_readv.2:243
2615 #, no-wrap
2616 msgid "B<EINVAL>"
2617 msgstr "B<EINVAL>"
2618
2619 #. type: Plain text
2620 #: build/C/man3/fopen.3:210
2621 msgid ""
2622 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2623 "invalid."
2624 msgstr ""
2625 "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2626
2627 #. type: Plain text
2628 #: build/C/man3/fopen.3:220
2629 msgid ""
2630 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2631 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2632 msgstr ""
2633 "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定さ"
2634 "れているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセット"
2635 "する。"
2636
2637 #. type: Plain text
2638 #: build/C/man3/fopen.3:227
2639 msgid ""
2640 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2641 "errors specified for the routine B<open>(2)."
2642 msgstr ""
2643 "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗すること"
2644 "があり、 その時は対応する値に I<errno> をセットする。"
2645
2646 #. type: Plain text
2647 #: build/C/man3/fopen.3:234
2648 msgid ""
2649 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2650 "errors specified for the routine B<fcntl>(2)."
2651 msgstr ""
2652 "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗するこ"
2653 "とがあり、 その時は対応する値に I<errno> をセットする。"
2654
2655 #. type: Plain text
2656 #: build/C/man3/fopen.3:244
2657 msgid ""
2658 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2659 "errors specified for the routines B<open>(2), B<fclose>(3)  and B<fflush>(3)."
2660 msgstr ""
2661 "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定"
2662 "されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセッ"
2663 "トする。"
2664
2665 #. type: Plain text
2666 #: build/C/man3/fopen.3:253
2667 msgid ""
2668 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>"
2669 "()  function conforms to POSIX.1-1990."
2670 msgstr ""
2671 "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数"
2672 "は POSIX.1-1990 に準拠している。"
2673
2674 #. type: SS
2675 #: build/C/man3/fopen.3:254
2676 #, no-wrap
2677 msgid "Glibc Notes"
2678 msgstr "glibc での注意"
2679
2680 #. type: Plain text
2681 #: build/C/man3/fopen.3:257
2682 msgid ""
2683 "The GNU C library allows the following extensions for the string specified "
2684 "in I<mode>:"
2685 msgstr ""
2686 "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われて"
2687 "いる:"
2688
2689 #. type: TP
2690 #: build/C/man3/fopen.3:257
2691 #, no-wrap
2692 msgid "B<c> (since glibc 2.3.3)"
2693 msgstr "B<c> (glibc 2.3.3 以降)"
2694
2695 #. type: Plain text
2696 #: build/C/man3/fopen.3:264
2697 msgid ""
2698 "Do not make the open operation, or subsequent read and write operations, "
2699 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2700 msgstr ""
2701 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2702 "(cancellation points) を作成しない。\n"
2703 "このフラグは B<fdopen>() では無視される。"
2704
2705 #. type: TP
2706 #: build/C/man3/fopen.3:264
2707 #, no-wrap
2708 msgid "B<e> (since glibc 2.7)"
2709 msgstr "B<e> (glibc 2.7 以降)"
2710
2711 #. type: Plain text
2712 #: build/C/man3/fopen.3:274
2713 msgid ""
2714 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2715 "information.  This flag is ignored for B<fdopen>()."
2716 msgstr ""
2717 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2718 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2719
2720 #. type: TP
2721 #: build/C/man3/fopen.3:274
2722 #, no-wrap
2723 msgid "B<m> (since glibc 2.3)"
2724 msgstr "B<m> (glibc 2.3 以降)"
2725
2726 #.  As at glibc 2.4:
2727 #. type: Plain text
2728 #: build/C/man3/fopen.3:286
2729 msgid ""
2730 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2731 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is only attempted "
2732 "for a file opened for reading."
2733 msgstr ""
2734 "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使って"
2735 "ファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用に"
2736 "オープンするファイルについてだけである。"
2737
2738 #. type: TP
2739 #: build/C/man3/fopen.3:286 build/C/man3/scanf.3:418
2740 #, no-wrap
2741 msgid "B<x>"
2742 msgstr "B<x>"
2743
2744 #.  Since glibc 2.0?
2745 #.  FIXME C11 specifies this flag
2746 #. type: Plain text
2747 #: build/C/man3/fopen.3:303
2748 msgid ""
2749 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2750 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2751 "This flag is ignored for B<fdopen>()."
2752 msgstr ""
2753 "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファ"
2754 "イルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> が"
2755 "セットされる。 このフラグは B<fdopen>()  では無視される。"
2756
2757 #. type: Plain text
2758 #: build/C/man3/fopen.3:311
2759 msgid ""
2760 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2761 "the following syntax in I<mode>:"
2762 msgstr ""
2763 "上記の文字に加えて、\n"
2764 "B<fopen>() と B<freopen>() では I<mode> に\n"
2765 "以下の書式を 指定することができる。"
2766
2767 #. type: Plain text
2768 #: build/C/man3/fopen.3:313
2769 msgid "B< ,ccs=>I<string>"
2770 msgstr "B< ,ccs=>I<string>"
2771
2772 #. type: Plain text
2773 #: build/C/man3/fopen.3:329
2774 msgid ""
2775 "The given I<string> is taken as the name of a coded character set and the "
2776 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2777 "functions convert I/O to and from the character set I<string>.  If the B<,"
2778 "ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2779 "stream is determined by the first file operation.  If that operation is a "
2780 "wide-character operation, the stream is marked wide-oriented, and functions "
2781 "to convert to the coded character set are loaded."
2782 msgstr ""
2783 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2784 "ストリームではワイド文字のストリームとして扱われる。\n"
2785 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2786 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2787 "ストリームをワイド文字のストリームとして扱うかは\n"
2788 "最初のファイル操作時に決定される。\n"
2789 "最初のファイル操作がワイド文字操作であった場合は、\n"
2790 "そのストリームはワイド文字のストリームとして扱われ、\n"
2791 "符号化文字集合との変換を行う関数が読み込まれる。"
2792
2793 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2794 #. type: Plain text
2795 #: build/C/man3/fopen.3:346
2796 msgid ""
2797 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2798 "preceding the \"ccs\" specification\"), the glibc implementation of B<fopen>"
2799 "()  and B<freopen>()  limits the number of characters examined in I<mode> to "
2800 "7 (or, in glibc versions before 2.14, to 6, which was not enough to include "
2801 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2802 "B<fdopen>()  parses at most 5 characters in in I<mode>."
2803 msgstr ""
2804 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2805 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2806 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2807 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2808 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2809 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2810
2811 #. type: Plain text
2812 #: build/C/man3/fopen.3:352
2813 msgid ""
2814 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2815 msgstr ""
2816 "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2817
2818 #. type: TH
2819 #: build/C/man3/fopencookie.3:24
2820 #, no-wrap
2821 msgid "FOPENCOOKIE"
2822 msgstr "FOPENCOOKIE"
2823
2824 #. type: TH
2825 #: build/C/man3/fopencookie.3:24
2826 #, no-wrap
2827 msgid "2008-12-05"
2828 msgstr "2008-12-05"
2829
2830 #. type: TH
2831 #: build/C/man3/fopencookie.3:24 build/C/man2/link.2:31
2832 #: build/C/man2/llseek.2:26 build/C/man2/lseek.2:45 build/C/man3/lseek64.3:23
2833 #: build/C/man2/open.2:52 build/C/man2/pipe.2:36 build/C/man2/read.2:35
2834 #: build/C/man2/readlink.2:41 build/C/man2/readv.2:30 build/C/man2/rename.2:32
2835 #: build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:46 build/C/man3/stdin.3:9
2836 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:35
2837 #: build/C/man2/unlink.2:32 build/C/man2/write.2:39
2838 #: build/C/man2/process_vm_readv.2:27
2839 #, no-wrap
2840 msgid "Linux"
2841 msgstr "Linux"
2842
2843 #. type: Plain text
2844 #: build/C/man3/fopencookie.3:27
2845 msgid "fopencookie - opening a custom stream"
2846 msgstr ""
2847
2848 #. type: Plain text
2849 #: build/C/man3/fopencookie.3:34
2850 #, no-wrap
2851 msgid ""
2852 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2853 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2854 msgstr ""
2855 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2856 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2857
2858 #. type: Plain text
2859 #: build/C/man3/fopencookie.3:47
2860 msgid ""
2861 "The B<fopencookie>()  function allows the programmer to create a custom "
2862 "implementation for a standard I/O stream.  This implementation can store the "
2863 "stream's data at a location of its own choosing; for example, B<fopencookie>"
2864 "()  is used to implement B<fmemopen>(3), which provides a stream interface "
2865 "to data that is stored in a buffer in memory."
2866 msgstr ""
2867
2868 #. type: Plain text
2869 #: build/C/man3/fopencookie.3:49
2870 msgid "In order to create a custom stream the programmer must:"
2871 msgstr ""
2872
2873 #. type: IP
2874 #: build/C/man3/fopencookie.3:49 build/C/man3/fopencookie.3:52
2875 #: build/C/man3/fopencookie.3:63 build/C/man3/scanf.3:669
2876 #: build/C/man3/scanf.3:674 build/C/man3/scanf.3:680
2877 #: build/C/man7/symlink.7:248 build/C/man7/symlink.7:258
2878 #: build/C/man7/symlink.7:288 build/C/man7/symlink.7:348
2879 #: build/C/man7/symlink.7:377 build/C/man7/symlink.7:406
2880 #: build/C/man7/symlink.7:437 build/C/man7/symlink.7:450
2881 #, no-wrap
2882 msgid "*"
2883 msgstr "*"
2884
2885 #. type: Plain text
2886 #: build/C/man3/fopencookie.3:52
2887 msgid ""
2888 "Implement four \"hook\" functions that are used internally by the standard I/"
2889 "O library when performing I/O on the stream."
2890 msgstr ""
2891
2892 #. type: Plain text
2893 #: build/C/man3/fopencookie.3:63
2894 msgid ""
2895 "Define a \"cookie\" data type, a structure that provides bookkeeping "
2896 "information (e.g., where to store data) used by the aforementioned hook "
2897 "functions.  The standard I/O package knows nothing about the contents of "
2898 "this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>"
2899 "()), but automatically supplies the cookie as the first argument when "
2900 "calling the hook functions."
2901 msgstr ""
2902
2903 #. type: Plain text
2904 #: build/C/man3/fopencookie.3:68
2905 msgid ""
2906 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
2907 "hook functions with that stream."
2908 msgstr ""
2909
2910 #. type: Plain text
2911 #: build/C/man3/fopencookie.3:76
2912 msgid ""
2913 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
2914 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
2915 "operate on that stream."
2916 msgstr ""
2917
2918 #. type: Plain text
2919 #: build/C/man3/fopencookie.3:83
2920 msgid ""
2921 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
2922 "to be associated with the new stream.  This pointer is supplied as the first "
2923 "argument when the standard I/O library invokes any of the hook functions "
2924 "described below."
2925 msgstr ""
2926
2927 #. type: Plain text
2928 #: build/C/man3/fopencookie.3:99
2929 msgid ""
2930 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
2931 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
2932 "See B<fopen>(3)  for details."
2933 msgstr ""
2934
2935 #. type: Plain text
2936 #: build/C/man3/fopencookie.3:105
2937 msgid ""
2938 "The I<io_funcs> argument is a structure that contains four fields pointing "
2939 "to the programmer-defined hook functions that are used to implement this "
2940 "stream.  The structure is defined as follows"
2941 msgstr ""
2942
2943 #. type: Plain text
2944 #: build/C/man3/fopencookie.3:114
2945 #, no-wrap
2946 msgid ""
2947 "struct cookie_io_functions_t {\n"
2948 "    cookie_read_function_t  *read;\n"
2949 "    cookie_write_function_t *write;\n"
2950 "    cookie_seek_function_t  *seek;\n"
2951 "    cookie_close_function_t *close;\n"
2952 "};\n"
2953 msgstr ""
2954 "struct cookie_io_functions_t {\n"
2955 "    cookie_read_function_t  *read;\n"
2956 "    cookie_write_function_t *write;\n"
2957 "    cookie_seek_function_t  *seek;\n"
2958 "    cookie_close_function_t *close;\n"
2959 "};\n"
2960
2961 #. type: Plain text
2962 #: build/C/man3/fopencookie.3:118
2963 msgid "The four fields are as follows:"
2964 msgstr ""
2965
2966 #. type: TP
2967 #: build/C/man3/fopencookie.3:118
2968 #, no-wrap
2969 msgid "I<cookie_read_function_t *read>"
2970 msgstr "I<cookie_read_function_t *read>"
2971
2972 #. type: Plain text
2973 #: build/C/man3/fopencookie.3:122
2974 msgid ""
2975 "This function implements read operations for the stream.  When called, it "
2976 "receives three arguments:"
2977 msgstr ""
2978
2979 #. type: Plain text
2980 #: build/C/man3/fopencookie.3:124
2981 #, no-wrap
2982 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
2983 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
2984
2985 #. type: Plain text
2986 #: build/C/man3/fopencookie.3:139
2987 msgid ""
2988 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
2989 "input data can be placed and the size of that buffer.  As its function "
2990 "result, the I<read> function should return the number of bytes copied into "
2991 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
2992 "update the stream offset appropriately."
2993 msgstr ""
2994
2995 #. type: Plain text
2996 #: build/C/man3/fopencookie.3:144
2997 msgid ""
2998 "If I<*read> is a NULL pointer, then reads from the custom stream always "
2999 "return end of file."
3000 msgstr ""
3001
3002 #. type: TP
3003 #: build/C/man3/fopencookie.3:144
3004 #, no-wrap
3005 msgid "I<cookie_write_function_t *write>"
3006 msgstr "I<cookie_write_function_t *write>"
3007
3008 #. type: Plain text
3009 #: build/C/man3/fopencookie.3:148
3010 msgid ""
3011 "This function implements write operations for the stream.  When called, it "
3012 "receives three arguments:"
3013 msgstr ""
3014
3015 #. type: Plain text
3016 #: build/C/man3/fopencookie.3:150
3017 #, no-wrap
3018 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3019 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
3020
3021 #. type: Plain text
3022 #: build/C/man3/fopencookie.3:165
3023 msgid ""
3024 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
3025 "output to the stream and the size of that buffer.  As its function result, "
3026 "the I<write> function should return the number of bytes copied from I<buf>, "
3027 "or -1 on error.  The I<write> function should update the stream offset "
3028 "appropriately."
3029 msgstr ""
3030
3031 #. type: Plain text
3032 #: build/C/man3/fopencookie.3:170
3033 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
3034 msgstr ""
3035
3036 #. type: TP
3037 #: build/C/man3/fopencookie.3:170
3038 #, no-wrap
3039 msgid "I<cookie_seek_function_t *seek>"
3040 msgstr "I<cookie_seek_function_t *seek>"
3041
3042 #. type: Plain text
3043 #: build/C/man3/fopencookie.3:174
3044 msgid ""
3045 "This function implements seek operations on the stream.  When called, it "
3046 "receives three arguments:"
3047 msgstr ""
3048
3049 #. type: Plain text
3050 #: build/C/man3/fopencookie.3:176
3051 #, no-wrap
3052 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
3053 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
3054
3055 #. type: Plain text
3056 #: build/C/man3/fopencookie.3:182
3057 msgid ""
3058 "The I<*offset> argument specifies the new file offset depending on which of "
3059 "the following three values is supplied in I<whence>:"
3060 msgstr ""
3061
3062 #. type: TP
3063 #: build/C/man3/fopencookie.3:183 build/C/man2/lseek.2:65
3064 #, no-wrap
3065 msgid "B<SEEK_SET>"
3066 msgstr "B<SEEK_SET>"
3067
3068 #. type: Plain text
3069 #: build/C/man3/fopencookie.3:188
3070 msgid ""
3071 "The stream offset should be set I<*offset> bytes from the start of the "
3072 "stream."
3073 msgstr ""
3074
3075 #. type: TP
3076 #: build/C/man3/fopencookie.3:188 build/C/man2/lseek.2:70
3077 #, no-wrap
3078 msgid "B<SEEK_CUR>"
3079 msgstr "B<SEEK_CUR>"
3080
3081 #. type: Plain text
3082 #: build/C/man3/fopencookie.3:192
3083 msgid "I<*offset> should be added to the current stream offset."
3084 msgstr ""
3085
3086 #. type: TP
3087 #: build/C/man3/fopencookie.3:192 build/C/man2/lseek.2:75
3088 #, no-wrap
3089 msgid "B<SEEK_END>"
3090 msgstr "B<SEEK_END>"
3091
3092 #. type: Plain text
3093 #: build/C/man3/fopencookie.3:196
3094 msgid ""
3095 "The stream offset should be set to the size of the stream plus I<*offset>."
3096 msgstr ""
3097
3098 #. type: Plain text
3099 #: build/C/man3/fopencookie.3:203
3100 msgid ""
3101 "Before returning, the I<seek> function should update I<*offset> to indicate "
3102 "the new stream offset."
3103 msgstr ""
3104
3105 #. type: Plain text
3106 #: build/C/man3/fopencookie.3:207
3107 msgid ""
3108 "As its function result, the I<seek> function should return 0 on success, and "
3109 "-1 on error."
3110 msgstr ""
3111
3112 #. type: Plain text
3113 #: build/C/man3/fopencookie.3:212
3114 msgid ""
3115 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
3116 "operations on the stream."
3117 msgstr ""
3118
3119 #. type: TP
3120 #: build/C/man3/fopencookie.3:212
3121 #, no-wrap
3122 msgid "I<cookie_close_function_t *close>"
3123 msgstr "I<cookie_close_function_t *close>"
3124
3125 #. type: Plain text
3126 #: build/C/man3/fopencookie.3:218
3127 msgid ""
3128 "This function closes the stream.  The hook function can do things such as "
3129 "freeing buffers allocated for the stream.  When called, it receives one "
3130 "argument:"
3131 msgstr ""
3132
3133 #. type: Plain text
3134 #: build/C/man3/fopencookie.3:220
3135 #, no-wrap
3136 msgid "    int close(void *cookie);\n"
3137 msgstr "    int close(void *cookie);\n"
3138
3139 #. type: Plain text
3140 #: build/C/man3/fopencookie.3:225
3141 msgid ""
3142 "The I<cookie> argument is the cookie that the programmer supplied when "
3143 "calling B<fopencookie>()."
3144 msgstr ""
3145
3146 #. type: Plain text
3147 #: build/C/man3/fopencookie.3:231
3148 msgid ""
3149 "As its function result, the I<close> function should return 0 on success, "
3150 "and B<EOF> on error."
3151 msgstr ""
3152
3153 #. type: Plain text
3154 #: build/C/man3/fopencookie.3:235
3155 msgid ""
3156 "If I<*close> is NULL, then no special action is performed when the stream is "
3157 "closed."
3158 msgstr ""
3159
3160 #.  .SH ERRORS
3161 #.  It's not clear if errno ever gets set...
3162 #. type: Plain text
3163 #: build/C/man3/fopencookie.3:242
3164 msgid ""
3165 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
3166 "NULL is returned."
3167 msgstr ""
3168
3169 #. type: Plain text
3170 #: build/C/man3/fopencookie.3:244
3171 msgid "This function is a nonstandard GNU extension."
3172 msgstr ""
3173
3174 #. type: Plain text
3175 #: build/C/man3/fopencookie.3:253
3176 msgid ""
3177 "The program below implements a custom stream whose functionality is similar "
3178 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
3179 "stream whose data is stored in a memory buffer.  The program writes its "
3180 "command-line arguments to the stream, and then seeks through the stream "
3181 "reading two out of every five characters and writing them to standard "
3182 "output.  The following shell session demonstrates the use of the program:"
3183 msgstr ""
3184
3185 #. type: Plain text
3186 #: build/C/man3/fopencookie.3:261
3187 #, no-wrap
3188 msgid ""
3189 "$B< ./a.out \\(aqhello world\\(aq>\n"
3190 "/he/\n"
3191 "/ w/\n"
3192 "/d/\n"
3193 "Reached end of file\n"
3194 msgstr ""
3195 "$B< ./a.out \\(aqhello world\\(aq>\n"
3196 "/he/\n"
3197 "/ w/\n"
3198 "/d/\n"
3199 "Reached end of file\n"
3200
3201 #. type: Plain text
3202 #: build/C/man3/fopencookie.3:268
3203 msgid ""
3204 "Note that a more general version of the program below could be improved to "
3205 "more robustly handle various error situations (e.g., opening a stream with a "
3206 "cookie that already has an open stream; closing a stream that has already "
3207 "been closed)."
3208 msgstr ""
3209
3210 #. type: Plain text
3211 #: build/C/man3/fopencookie.3:277
3212 #, no-wrap
3213 msgid ""
3214 "#define _GNU_SOURCE\n"
3215 "#include E<lt>sys/types.hE<gt>\n"
3216 "#include E<lt>stdio.hE<gt>\n"
3217 "#include E<lt>stdlib.hE<gt>\n"
3218 "#include E<lt>unistd.hE<gt>\n"
3219 "#include E<lt>string.hE<gt>\n"
3220 msgstr ""
3221 "#define _GNU_SOURCE\n"
3222 "#include E<lt>sys/types.hE<gt>\n"
3223 "#include E<lt>stdio.hE<gt>\n"
3224 "#include E<lt>stdlib.hE<gt>\n"
3225 "#include E<lt>unistd.hE<gt>\n"
3226 "#include E<lt>string.hE<gt>\n"
3227
3228 #. type: Plain text
3229 #: build/C/man3/fopencookie.3:279
3230 #, no-wrap
3231 msgid "#define INIT_BUF_SIZE 4\n"
3232 msgstr "#define INIT_BUF_SIZE 4\n"
3233
3234 #. type: Plain text
3235 #: build/C/man3/fopencookie.3:286
3236 #, no-wrap
3237 msgid ""
3238 "struct memfile_cookie {\n"
3239 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3240 "    size_t  allocated;  /* Size of buf */\n"
3241 "    size_t  endpos;     /* Number of characters in buf */\n"
3242 "    off_t   offset;     /* Current file offset in buf */\n"
3243 "};\n"
3244 msgstr ""
3245 "struct memfile_cookie {\n"
3246 "    char   *buf;        /* Dynamically sized buffer for data */\n"
3247 "    size_t  allocated;  /* Size of buf */\n"
3248 "    size_t  endpos;     /* Number of characters in buf */\n"
3249 "    off_t   offset;     /* Current file offset in buf */\n"
3250 "};\n"
3251
3252 #. type: Plain text
3253 #: build/C/man3/fopencookie.3:292
3254 #, no-wrap
3255 msgid ""
3256 "ssize_t\n"
3257 "memfile_write(void *c, const char *buf, size_t size)\n"
3258 "{\n"
3259 "    char *new_buff;\n"
3260 "    struct memfile_cookie *cookie = c;\n"
3261 msgstr ""
3262 "ssize_t\n"
3263 "memfile_write(void *c, const char *buf, size_t size)\n"
3264 "{\n"
3265 "    char *new_buff;\n"
3266 "    struct memfile_cookie *cookie = c;\n"
3267
3268 #. type: Plain text
3269 #: build/C/man3/fopencookie.3:294
3270 #, no-wrap
3271 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
3272 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
3273
3274 #. type: Plain text
3275 #: build/C/man3/fopencookie.3:304
3276 #, no-wrap
3277 msgid ""
3278 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3279 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3280 "        if (new_buff == NULL) {\n"
3281 "            return -1;\n"
3282 "        } else {\n"
3283 "            cookie-E<gt>allocated *= 2;\n"
3284 "            cookie-E<gt>buf = new_buff;\n"
3285 "        }\n"
3286 "    }\n"
3287 msgstr ""
3288 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
3289 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
3290 "        if (new_buff == NULL) {\n"
3291 "            return -1;\n"
3292 "        } else {\n"
3293 "            cookie-E<gt>allocated *= 2;\n"
3294 "            cookie-E<gt>buf = new_buff;\n"
3295 "        }\n"
3296 "    }\n"
3297
3298 #. type: Plain text
3299 #: build/C/man3/fopencookie.3:306
3300 #, no-wrap
3301 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3302 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
3303
3304 #. type: Plain text
3305 #: build/C/man3/fopencookie.3:310
3306 #, no-wrap
3307 msgid ""
3308 "    cookie-E<gt>offset += size;\n"
3309 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3310 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3311 msgstr ""
3312 "    cookie-E<gt>offset += size;\n"
3313 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
3314 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
3315
3316 #. type: Plain text
3317 #: build/C/man3/fopencookie.3:313
3318 #, no-wrap
3319 msgid ""
3320 "    return size;\n"
3321 "}\n"
3322 msgstr ""
3323 "    return size;\n"
3324 "}\n"
3325
3326 #. type: Plain text
3327 #: build/C/man3/fopencookie.3:319
3328 #, no-wrap
3329 msgid ""
3330 "ssize_t\n"
3331 "memfile_read(void *c, char *buf, size_t size)\n"
3332 "{\n"
3333 "    ssize_t xbytes;\n"
3334 "    struct memfile_cookie *cookie = c;\n"
3335 msgstr ""
3336 "ssize_t\n"
3337 "memfile_read(void *c, char *buf, size_t size)\n"
3338 "{\n"
3339 "    ssize_t xbytes;\n"
3340 "    struct memfile_cookie *cookie = c;\n"
3341
3342 #. type: Plain text
3343 #: build/C/man3/fopencookie.3:321
3344 #, no-wrap
3345 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
3346 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
3347
3348 #. type: Plain text
3349 #: build/C/man3/fopencookie.3:327
3350 #, no-wrap
3351 msgid ""
3352 "    xbytes = size;\n"
3353 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3354 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3355 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3356 "       xbytes = 0;\n"
3357 msgstr ""
3358 "    xbytes = size;\n"
3359 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
3360 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
3361 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
3362 "       xbytes = 0;\n"
3363
3364 #. type: Plain text
3365 #: build/C/man3/fopencookie.3:329
3366 #, no-wrap
3367 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3368 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
3369
3370 #. type: Plain text
3371 #: build/C/man3/fopencookie.3:333
3372 #, no-wrap
3373 msgid ""
3374 "    cookie-E<gt>offset += xbytes;\n"
3375 "    return xbytes;\n"
3376 "}\n"
3377 msgstr ""
3378 "    cookie-E<gt>offset += xbytes;\n"
3379 "    return xbytes;\n"
3380 "}\n"
3381
3382 #. type: Plain text
3383 #: build/C/man3/fopencookie.3:339
3384 #, no-wrap
3385 msgid ""
3386 "int\n"
3387 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3388 "{\n"
3389 "    off64_t new_offset;\n"
3390 "    struct memfile_cookie *cookie = c;\n"
3391 msgstr ""
3392 "int\n"
3393 "memfile_seek(void *c, off64_t *offset, int whence)\n"
3394 "{\n"
3395 "    off64_t new_offset;\n"
3396 "    struct memfile_cookie *cookie = c;\n"
3397
3398 #. type: Plain text
3399 #: build/C/man3/fopencookie.3:348
3400 #, no-wrap
3401 msgid ""
3402 "    if (whence == SEEK_SET)\n"
3403 "        new_offset = *offset;\n"
3404 "    else if (whence == SEEK_END)\n"
3405 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3406 "    else if (whence == SEEK_CUR)\n"
3407 "        new_offset = cookie-E<gt>offset + *offset;\n"
3408 "    else\n"
3409 "        return -1;\n"
3410 msgstr ""
3411 "    if (whence == SEEK_SET)\n"
3412 "        new_offset = *offset;\n"
3413 "    else if (whence == SEEK_END)\n"
3414 "        new_offset = cookie-E<gt>endpos + *offset;\n"
3415 "    else if (whence == SEEK_CUR)\n"
3416 "        new_offset = cookie-E<gt>offset + *offset;\n"
3417 "    else\n"
3418 "        return -1;\n"
3419
3420 #. type: Plain text
3421 #: build/C/man3/fopencookie.3:351
3422 #, no-wrap
3423 msgid ""
3424 "    if (new_offset E<lt> 0)\n"
3425 "        return -1;\n"
3426 msgstr ""
3427 "    if (new_offset E<lt> 0)\n"
3428 "        return -1;\n"
3429
3430 #. type: Plain text
3431 #: build/C/man3/fopencookie.3:356
3432 #, no-wrap
3433 msgid ""
3434 "    cookie-E<gt>offset = new_offset;\n"
3435 "    *offset = new_offset;\n"
3436 "    return 0;\n"
3437 "}\n"
3438 msgstr ""
3439 "    cookie-E<gt>offset = new_offset;\n"
3440 "    *offset = new_offset;\n"
3441 "    return 0;\n"
3442 "}\n"
3443
3444 #. type: Plain text
3445 #: build/C/man3/fopencookie.3:361
3446 #, no-wrap
3447 msgid ""
3448 "int\n"
3449 "memfile_close(void *c)\n"
3450 "{\n"
3451 "    struct memfile_cookie *cookie = c;\n"
3452 msgstr ""
3453 "int\n"
3454 "memfile_close(void *c)\n"
3455 "{\n"
3456 "    struct memfile_cookie *cookie = c;\n"
3457
3458 #. type: Plain text
3459 #: build/C/man3/fopencookie.3:365
3460 #, no-wrap
3461 msgid ""
3462 "    free(cookie-E<gt>buf);\n"
3463 "    cookie-E<gt>allocated = 0;\n"
3464 "    cookie-E<gt>buf = NULL;\n"
3465 msgstr ""
3466 "    free(cookie-E<gt>buf);\n"
3467 "    cookie-E<gt>allocated = 0;\n"
3468 "    cookie-E<gt>buf = NULL;\n"
3469
3470 #. type: Plain text
3471 #: build/C/man3/fopencookie.3:368
3472 #, no-wrap
3473 msgid ""
3474 "    return 0;\n"
3475 "}\n"
3476 msgstr ""
3477 "    return 0;\n"
3478 "}\n"
3479
3480 #. type: Plain text
3481 #: build/C/man3/fopencookie.3:384
3482 #, no-wrap
3483 msgid ""
3484 "int\n"
3485 "main(int argc, char *argv[])\n"
3486 "{\n"
3487 "    cookie_io_functions_t  memfile_func = {\n"
3488 "        .read  = memfile_read,\n"
3489 "        .write = memfile_write,\n"
3490 "        .seek  = memfile_seek,\n"
3491 "        .close = memfile_close\n"
3492 "    };\n"
3493 "    FILE *fp;\n"
3494 "    struct memfile_cookie mycookie;\n"
3495 "    ssize_t nread;\n"
3496 "    long p;\n"
3497 "    int j;\n"
3498 "    char buf[1000];\n"
3499 msgstr ""
3500 "int\n"
3501 "main(int argc, char *argv[])\n"
3502 "{\n"
3503 "    cookie_io_functions_t  memfile_func = {\n"
3504 "        .read  = memfile_read,\n"
3505 "        .write = memfile_write,\n"
3506 "        .seek  = memfile_seek,\n"
3507 "        .close = memfile_close\n"
3508 "    };\n"
3509 "    FILE *fp;\n"
3510 "    struct memfile_cookie mycookie;\n"
3511 "    ssize_t nread;\n"
3512 "    long p;\n"
3513 "    int j;\n"
3514 "    char buf[1000];\n"
3515
3516 #. type: Plain text
3517 #: build/C/man3/fopencookie.3:386
3518 #, no-wrap
3519 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3520 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3521
3522 #. type: Plain text
3523 #: build/C/man3/fopencookie.3:392
3524 #, no-wrap
3525 msgid ""
3526 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3527 "    if (mycookie.buf == NULL) {\n"
3528 "        perror(\"malloc\");\n"
3529 "        exit(EXIT_FAILURE);\n"
3530 "    }\n"
3531 msgstr ""
3532 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3533 "    if (mycookie.buf == NULL) {\n"
3534 "        perror(\"malloc\");\n"
3535 "        exit(EXIT_FAILURE);\n"
3536 "    }\n"
3537
3538 #. type: Plain text
3539 #: build/C/man3/fopencookie.3:396
3540 #, no-wrap
3541 msgid ""
3542 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3543 "    mycookie.offset = 0;\n"
3544 "    mycookie.endpos = 0;\n"
3545 msgstr ""
3546 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3547 "    mycookie.offset = 0;\n"
3548 "    mycookie.endpos = 0;\n"
3549
3550 #. type: Plain text
3551 #: build/C/man3/fopencookie.3:402
3552 #, no-wrap
3553 msgid ""
3554 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3555 "    if (fp == NULL) {\n"
3556 "        perror(\"fopencookie\");\n"
3557 "        exit(EXIT_FAILURE);\n"
3558 "    }\n"
3559 msgstr ""
3560 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3561 "    if (fp == NULL) {\n"
3562 "        perror(\"fopencookie\");\n"
3563 "        exit(EXIT_FAILURE);\n"
3564 "    }\n"
3565
3566 #. type: Plain text
3567 #: build/C/man3/fopencookie.3:404
3568 #, no-wrap
3569 msgid "    /* Write command-line arguments to our file */\n"
3570 msgstr "    /* Write command-line arguments to our file */\n"
3571
3572 #. type: Plain text
3573 #: build/C/man3/fopencookie.3:410
3574 #, no-wrap
3575 msgid ""
3576 "    for (j = 1; j E<lt> argc; j++)\n"
3577 "        if (fputs(argv[j], fp) == EOF) {\n"
3578 "            perror(\"fputs\");\n"
3579 "            exit(EXIT_FAILURE);\n"
3580 "        }\n"
3581 msgstr ""
3582 "    for (j = 1; j E<lt> argc; j++)\n"
3583 "        if (fputs(argv[j], fp) == EOF) {\n"
3584 "            perror(\"fputs\");\n"
3585 "            exit(EXIT_FAILURE);\n"
3586 "        }\n"
3587
3588 #. type: Plain text
3589 #: build/C/man3/fopencookie.3:412
3590 #, no-wrap
3591 msgid "    /* Read two bytes out of every five, until EOF */\n"
3592 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3593
3594 #. type: Plain text
3595 #: build/C/man3/fopencookie.3:427
3596 #, no-wrap
3597 msgid ""
3598 "    for (p = 0; ; p += 5) {\n"
3599 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3600 "            perror(\"fseek\");\n"
3601 "            exit(EXIT_FAILURE);\n"
3602 "        }\n"
3603 "        nread = fread(buf, 1, 2, fp);\n"
3604 "        if (nread == -1) {\n"
3605 "            perror(\"fread\");\n"
3606 "            exit(EXIT_FAILURE);\n"
3607 "        }\n"
3608 "        if (nread == 0) {\n"
3609 "            printf(\"Reached end of file\\en\");\n"
3610 "            break;\n"
3611 "        }\n"
3612 msgstr ""
3613 "    for (p = 0; ; p += 5) {\n"
3614 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
3615 "            perror(\"fseek\");\n"
3616 "            exit(EXIT_FAILURE);\n"
3617 "        }\n"
3618 "        nread = fread(buf, 1, 2, fp);\n"
3619 "        if (nread == -1) {\n"
3620 "            perror(\"fread\");\n"
3621 "            exit(EXIT_FAILURE);\n"
3622 "        }\n"
3623 "        if (nread == 0) {\n"
3624 "            printf(\"Reached end of file\\en\");\n"
3625 "            break;\n"
3626 "        }\n"
3627
3628 #. type: Plain text
3629 #: build/C/man3/fopencookie.3:430
3630 #, no-wrap
3631 msgid ""
3632 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3633 "    }\n"
3634 msgstr ""
3635 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3636 "    }\n"
3637
3638 #. type: Plain text
3639 #: build/C/man3/fopencookie.3:433 build/C/man2/readlink.2:211
3640 #, no-wrap
3641 msgid ""
3642 "    exit(EXIT_SUCCESS);\n"
3643 "}\n"
3644 msgstr ""
3645 "    exit(EXIT_SUCCESS);\n"
3646 "}\n"
3647
3648 #. type: Plain text
3649 #: build/C/man3/fopencookie.3:439
3650 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3651 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3652
3653 #. type: TH
3654 #: build/C/man3/fpurge.3:23
3655 #, no-wrap
3656 msgid "FPURGE"
3657 msgstr "FPURGE"
3658
3659 #. type: TH
3660 #: build/C/man3/fpurge.3:23
3661 #, no-wrap
3662 msgid "2001-12-15"
3663 msgstr "2001-12-15"
3664
3665 #. type: Plain text
3666 #: build/C/man3/fpurge.3:26
3667 msgid "fpurge, __fpurge - purge a stream"
3668 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3669
3670 #. type: Plain text
3671 #: build/C/man3/fpurge.3:30
3672 #, no-wrap
3673 msgid ""
3674 "/* unsupported */\n"
3675 "B<#include E<lt>stdio.hE<gt>>\n"
3676 msgstr ""
3677 "/* unsupported */\n"
3678 "B<#include E<lt>stdio.hE<gt>>\n"
3679
3680 #. type: Plain text
3681 #: build/C/man3/fpurge.3:32
3682 #, no-wrap
3683 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3684 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3685
3686 #. type: Plain text
3687 #: build/C/man3/fpurge.3:35
3688 #, no-wrap
3689 msgid ""
3690 "/* supported */\n"
3691 "B<#include E<lt>stdio.hE<gt>>\n"
3692 msgstr ""
3693 "/* supported */\n"
3694 "B<#include E<lt>stdio.hE<gt>>\n"
3695
3696 #. type: Plain text
3697 #: build/C/man3/fpurge.3:37
3698 #, no-wrap
3699 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3700 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3701
3702 #. type: Plain text
3703 #: build/C/man3/fpurge.3:39
3704 #, no-wrap
3705 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3706 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3707
3708 #. type: Plain text
3709 #: build/C/man3/fpurge.3:52
3710 msgid ""
3711 "The function B<fpurge>()  clears the buffers of the given stream.  For "
3712 "output streams this discards any unwritten output.  For input streams this "
3713 "discards any input read from the underlying object but not yet obtained via "
3714 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
3715 "B<fflush>(3)."
3716 msgstr ""
3717 "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力スト"
3718 "リームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこ"
3719 "れを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を"
3720 "待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻された"
3721 "テキストも含まれる。 B<fflush>(3)  も参照のこと。"
3722
3723 #. type: Plain text
3724 #: build/C/man3/fpurge.3:56
3725 msgid ""
3726 "The function B<__fpurge>()  does precisely the same, but without returning a "
3727 "value."
3728 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3729
3730 #. type: Plain text
3731 #: build/C/man3/fpurge.3:63
3732 msgid ""
3733 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3734 "and sets I<errno> appropriately."
3735 msgstr ""
3736 "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> "
3737 "を適切な値に設定する。"
3738
3739 #. type: Plain text
3740 #: build/C/man3/fpurge.3:68
3741 msgid "I<stream> is not an open stream."
3742 msgstr "I<stream> がオープンされていない。"
3743
3744 #. type: Plain text
3745 #: build/C/man3/fpurge.3:76
3746 msgid ""
3747 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3748 "was introduced in 4.4BSD and is not available under Linux.  The function "
3749 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3750 "later."
3751 msgstr ""
3752 "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD "
3753 "で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入"
3754 "され、glibc 2.1.95 以降には存在している。"
3755
3756 #. type: Plain text
3757 #: build/C/man3/fpurge.3:78
3758 msgid "Usually it is a mistake to want to discard input buffers."
3759 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3760
3761 #.  .BR fclean (3),
3762 #. type: Plain text
3763 #: build/C/man3/fpurge.3:83
3764 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3765 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3766
3767 #. type: TH
3768 #: build/C/man3/fputwc.3:14
3769 #, no-wrap
3770 msgid "FPUTWC"
3771 msgstr "FPUTWC"
3772
3773 #. type: Plain text
3774 #: build/C/man3/fputwc.3:17
3775 msgid "fputwc, putwc - write a wide character to a FILE stream"
3776 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3777
3778 #. type: Plain text
3779 #: build/C/man3/fputwc.3:25
3780 #, no-wrap
3781 msgid ""
3782 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3783 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3784 msgstr ""
3785 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3786 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3787
3788 #. type: Plain text
3789 #: build/C/man3/fputwc.3:41
3790 msgid ""
3791 "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>"
3792 "(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror"
3793 "(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion "
3794 "error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise "
3795 "it returns I<wc>."
3796 msgstr ""
3797 "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数"
3798 "は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になる"
3799 "と、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 "
3800 "I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この"
3801 "関数は I<wc> を返す。"
3802
3803 #. type: Plain text
3804 #: build/C/man3/fputwc.3:49
3805 msgid ""
3806 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3807 "may be implemented as a macro, and may evaluate its argument more than "
3808 "once.  There is no reason ever to use it."
3809 msgstr ""
3810 "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関"
3811 "数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれ"
3812 "ない。この関数を使う理由はもはや存在しない。"
3813
3814 #. type: Plain text
3815 #: build/C/man3/fputwc.3:58
3816 msgid ""
3817 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3818 "indicate an error."
3819 msgstr ""
3820 "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には "
3821 "B<WEOF> を返す。"
3822
3823 #. type: Plain text
3824 #: build/C/man3/fputwc.3:63
3825 msgid "Conversion of I<wc> to the stream's encoding fails."
3826 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3827
3828 #. type: Plain text
3829 #: build/C/man3/fputwc.3:72
3830 msgid ""
3831 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
3832 "current locale."
3833 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
3834
3835 #. type: Plain text
3836 #: build/C/man3/fputwc.3:80
3837 msgid ""
3838 "In the absence of additional information passed to the B<fopen>(3)  call, it "
3839 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
3840 "sequence corresponding to the wide character I<wc>."
3841 msgstr ""
3842 "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実"
3843 "際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待して"
3844 "よい。"
3845
3846 #. type: Plain text
3847 #: build/C/man3/fputwc.3:84
3848 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3849 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3850
3851 #. type: TH
3852 #: build/C/man3/fread.3:43
3853 #, no-wrap
3854 msgid "FREAD"
3855 msgstr "FREAD"
3856
3857 #. type: TH
3858 #: build/C/man3/fread.3:43
3859 #, no-wrap
3860 msgid "2012-03-30"
3861 msgstr "2012-03-30"
3862
3863 #. type: Plain text
3864 #: build/C/man3/fread.3:46
3865 msgid "fread, fwrite - binary stream input/output"
3866 msgstr "fread, fwrite - バイナリストリームの入出力"
3867
3868 #. type: Plain text
3869 #: build/C/man3/fread.3:52
3870 #, no-wrap
3871 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3872 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3873
3874 #. type: Plain text
3875 #: build/C/man3/fread.3:55
3876 #, no-wrap
3877 msgid ""
3878 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3879 "B<              FILE *>I<stream>B<);>\n"
3880 msgstr ""
3881 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3882 "B<              FILE *>I<stream>B<);>\n"
3883
3884 #. type: Plain text
3885 #: build/C/man3/fread.3:67
3886 msgid ""
3887 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
3888 "long, from the stream pointed to by I<stream>, storing them at the location "
3889 "given by I<ptr>."
3890 msgstr ""
3891 "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個の"
3892 "データを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは "
3893 "I<size> バイトの長さを持つ。"
3894
3895 #. type: Plain text
3896 #: build/C/man3/fread.3:78
3897 msgid ""
3898 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
3899 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
3900 "location given by I<ptr>."
3901 msgstr ""
3902 "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 "
3903 "I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> "
3904 "バイトの長さを持つ。"
3905
3906 #. type: Plain text
3907 #: build/C/man3/fread.3:94
3908 msgid ""
3909 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
3910 "or written.  This number equals the number of bytes transferred only when "
3911 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
3912 "return value is a short item count (or zero)."
3913 msgstr ""
3914 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
3915 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
3916 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
3917 "返り値は指定した個数よりも小さい値 (または 0) となる。"
3918
3919 #. type: Plain text
3920 #: build/C/man3/fread.3:101
3921 msgid ""
3922 "B<fread>()  does not distinguish between end-of-file and error, and callers "
3923 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
3924 msgstr ""
3925 "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断"
3926 "するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければな"
3927 "らない。"
3928
3929 #. type: Plain text
3930 #: build/C/man3/fread.3:103
3931 msgid "C89, POSIX.1-2001."
3932 msgstr "C89, POSIX.1-2001."
3933
3934 #. type: Plain text
3935 #: build/C/man3/fread.3:109
3936 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
3937 msgstr ""
3938 "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
3939
3940 #. type: TH
3941 #: build/C/man3/fseek.3:40
3942 #, no-wrap
3943 msgid "FSEEK"
3944 msgstr "FSEEK"
3945
3946 #. type: TH
3947 #: build/C/man3/fseek.3:40
3948 #, no-wrap
3949 msgid "1993-11-29"
3950 msgstr "1993-11-29"
3951
3952 #. type: Plain text
3953 #: build/C/man3/fseek.3:43
3954 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
3955 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
3956
3957 #. type: Plain text
3958 #: build/C/man3/fseek.3:47
3959 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
3960 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
3961
3962 #. type: Plain text
3963 #: build/C/man3/fseek.3:49
3964 msgid "B<long ftell(FILE *>I<stream>B<);>"
3965 msgstr "B<long ftell(FILE *>I<stream>B<);>"
3966
3967 #. type: Plain text
3968 #: build/C/man3/fseek.3:51
3969 msgid "B<void rewind(FILE *>I<stream>B<);>"
3970 msgstr "B<void rewind(FILE *>I<stream>B<);>"
3971
3972 #. type: Plain text
3973 #: build/C/man3/fseek.3:53
3974 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3975 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3976
3977 #. type: Plain text
3978 #: build/C/man3/fseek.3:55
3979 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3980 msgstr "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3981
3982 #. type: Plain text
3983 #: build/C/man3/fseek.3:79
3984 msgid ""
3985 "The B<fseek>()  function sets the file position indicator for the stream "
3986 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
3987 "by adding I<offset> bytes to the position specified by I<whence>.  If "
3988 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
3989 "relative to the start of the file, the current position indicator, or end-of-"
3990 "file, respectively.  A successful call to the B<fseek>()  function clears "
3991 "the end-of-file indicator for the stream and undoes any effects of the "
3992 "B<ungetc>(3)  function on the same stream."
3993 msgstr ""
3994 "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位"
3995 "置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は "
3996 "I<whence> で指定された位置に I<offset> バイトを加えることによって与えられ"
3997 "る。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている"
3998 "場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフ"
3999 "セットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-"
4000 "of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはな"
4001 "かったことになる。"
4002
4003 #. type: Plain text
4004 #: build/C/man3/fseek.3:85
4005 msgid ""
4006 "The B<ftell>()  function obtains the current value of the file position "
4007 "indicator for the stream pointed to by I<stream>."
4008 msgstr ""
4009 "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位"
4010 "置表示子 の現時点での値を与える。"
4011
4012 #. type: Plain text
4013 #: build/C/man3/fseek.3:92
4014 msgid ""
4015 "The B<rewind>()  function sets the file position indicator for the stream "
4016 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
4017 msgstr ""
4018 "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル"
4019 "位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
4020
4021 #. type: Plain text
4022 #: build/C/man3/fseek.3:95
4023 msgid "(void) fseek(stream, 0L, SEEK_SET)"
4024 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
4025
4026 #. type: Plain text
4027 #: build/C/man3/fseek.3:99
4028 msgid ""
4029 "except that the error indicator for the stream is also cleared (see "
4030 "B<clearerr>(3))."
4031 msgstr ""
4032 "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同"
4033 "時に クリアされる ( B<clearerr>(3)  を見よ)。"
4034
4035 #. type: Plain text
4036 #: build/C/man3/fseek.3:117
4037 msgid ""
4038 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
4039 "equivalent to B<ftell>()  and B<fseek>()  (with whence set to B<SEEK_SET>), "
4040 "setting and storing the current value of the file offset into or from the "
4041 "object referenced by I<pos>.  On some non-UNIX systems an I<fpos_t> object "
4042 "may be a complex object and these routines may be the only way to portably "
4043 "reposition a text stream."
4044 msgstr ""
4045 "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>"
4046 "()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインター"
4047 "フェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が"
4048 "参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に"
4049 "設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブ"
4050 "ジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変"
4051 "更する方法のうち、移植性のある唯一のもの になっている場合もある。"
4052
4053 #. type: Plain text
4054 #: build/C/man3/fseek.3:132
4055 msgid ""
4056 "The B<rewind>()  function returns no value.  Upon successful completion, "
4057 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
4058 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4059 "indicate the error."
4060 msgstr ""
4061 "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は"
4062 "成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返"
4063 "り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
4064
4065 #. type: Plain text
4066 #: build/C/man3/fseek.3:138
4067 msgid "The I<stream> specified is not a seekable stream."
4068 msgstr "指定した I<stream> がシークできない。"
4069
4070 #. type: Plain text
4071 #: build/C/man3/fseek.3:149
4072 msgid ""
4073 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
4074 "B<SEEK_CUR>."
4075 msgstr ""
4076 "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, "
4077 "B<SEEK_CUR> 以外の値であった。"
4078
4079 #. type: Plain text
4080 #: build/C/man3/fseek.3:164
4081 msgid ""
4082 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
4083 "also fail and set I<errno> for any of the errors specified for the routines "
4084 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
4085 msgstr ""
4086 "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>"
4087 "(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗"
4088 "する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
4089
4090 #. type: Plain text
4091 #: build/C/man3/fseek.3:169
4092 msgid "B<lseek>(2), B<fseeko>(3)"
4093 msgstr "B<lseek>(2), B<fseeko>(3)"
4094
4095 #. type: TH
4096 #: build/C/man3/fseeko.3:23
4097 #, no-wrap
4098 msgid "FSEEKO"
4099 msgstr "FSEEKO"
4100
4101 #. type: TH
4102 #: build/C/man3/fseeko.3:23
4103 #, no-wrap
4104 msgid "2001-11-05"
4105 msgstr "2001-11-05"
4106
4107 #. type: Plain text
4108 #: build/C/man3/fseeko.3:26
4109 msgid "fseeko, ftello - seek to or report file position"
4110 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
4111
4112 #. type: Plain text
4113 #: build/C/man3/fseeko.3:31
4114 #, no-wrap
4115 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4116 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4117
4118 #. type: Plain text
4119 #: build/C/man3/fseeko.3:34
4120 #, no-wrap
4121 msgid ""
4122 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4123 "\n"
4124 msgstr ""
4125 "B<off_t ftello(FILE *>I<stream>B<);>\n"
4126 "\n"
4127
4128 #. type: Plain text
4129 #: build/C/man3/fseeko.3:52
4130 msgid ""
4131 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
4132 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
4133 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
4134 "I<off_t> instead of I<long>."
4135 msgstr ""
4136 "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および "
4137 "B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>"
4138 "()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく "
4139 "I<off_t> になっている。"
4140
4141 #. type: Plain text
4142 #: build/C/man3/fseeko.3:55
4143 msgid ""
4144 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
4145 "compilation with"
4146 msgstr ""
4147 "多くのアーキテクチャでは I<off_t> も I<long> も共に 32 ビットの型であるが、"
4148
4149 #. type: Plain text
4150 #: build/C/man3/fseeko.3:59 build/C/man3/lseek64.3:79
4151 #, no-wrap
4152 msgid "#define _FILE_OFFSET_BITS 64\n"
4153 msgstr "#define _FILE_OFFSET_BITS 64\n"
4154
4155 #. type: Plain text
4156 #: build/C/man3/fseeko.3:63
4157 msgid "will turn I<off_t> into a 64-bit type."
4158 msgstr "でコンパイルすると I<off_t> は 64 ビット型となる。"
4159
4160 #. type: Plain text
4161 #: build/C/man3/fseeko.3:72
4162 msgid ""
4163 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
4164 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
4165 "indicate the error."
4166 msgstr ""
4167 "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返"
4168 "す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
4169
4170 #. type: Plain text
4171 #: build/C/man3/fseeko.3:75
4172 msgid "See the ERRORS in B<fseek>(3)."
4173 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
4174
4175 #. type: Plain text
4176 #: build/C/man3/fseeko.3:77
4177 msgid "SUSv2, POSIX.1-2001."
4178 msgstr "SUSv2, POSIX.1-2001."
4179
4180 #. type: Plain text
4181 #: build/C/man3/fseeko.3:81
4182 msgid ""
4183 "These functions are found on System V-like systems.  They are not present in "
4184 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
4185 msgstr ""
4186 "これらの関数は System V 的なシステムにある。 libc4, libc5, glibc 2.0 にはな"
4187 "かったが、 glibc 2.1 から使えるようになった。"
4188
4189 #. type: Plain text
4190 #: build/C/man3/fseeko.3:83
4191 msgid "B<fseek>(3)"
4192 msgstr "B<fseek>(3)"
4193
4194 #. type: TH
4195 #: build/C/man3/getline.3:24
4196 #, no-wrap
4197 msgid "GETLINE"
4198 msgstr "GETLINE"
4199
4200 #. type: TH
4201 #: build/C/man3/getline.3:24
4202 #, no-wrap
4203 msgid "2010-06-12"
4204 msgstr "2010-06-12"
4205
4206 #. type: Plain text
4207 #: build/C/man3/getline.3:27
4208 msgid "getline, getdelim - delimited string input"
4209 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
4210
4211 #. type: Plain text
4212 #: build/C/man3/getline.3:32
4213 #, no-wrap
4214 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4215 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
4216
4217 #. type: Plain text
4218 #: build/C/man3/getline.3:35
4219 #, no-wrap
4220 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4221 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
4222
4223 #. type: Plain text
4224 #: build/C/man3/getline.3:45
4225 msgid "B<getline>(), B<getdelim>():"
4226 msgstr "B<getline>(), B<getdelim>():"
4227
4228 #. type: Plain text
4229 #: build/C/man3/getline.3:50
4230 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4231 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
4232
4233 #. type: Plain text
4234 #: build/C/man3/getline.3:63
4235 msgid ""
4236 "B<getline>()  reads an entire line from I<stream>, storing the address of "
4237 "the buffer containing the text into I<*lineptr>.  The buffer is null-"
4238 "terminated and includes the newline character, if one was found."
4239 msgstr ""
4240 "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれている"
4241 "バッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終"
4242 "端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
4243
4244 #. type: Plain text
4245 #: build/C/man3/getline.3:73
4246 msgid ""
4247 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
4248 "storing the line, which should be freed by the user program.  (In this case, "
4249 "the value in I<*n> is ignored.)"
4250 msgstr ""
4251 "I<*lineptr> が NULL の場合、 B<getline>()  は行の内容を格納するためのバッファ"
4252 "を確保する。 このバッファはユーザーのプログラムで解放すべきである (この場"
4253 "合、 I<*n> の値は無視される)。"
4254
4255 #. type: Plain text
4256 #: build/C/man3/getline.3:91
4257 msgid ""
4258 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
4259 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
4260 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
4261 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
4262 msgstr ""
4263 "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  "
4264 "で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともでき"
4265 "る。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は "
4266 "B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と "
4267 "I<*n> を更新する。"
4268
4269 #. type: Plain text
4270 #: build/C/man3/getline.3:97
4271 msgid ""
4272 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
4273 "to reflect the buffer address and allocated size respectively."
4274 msgstr ""
4275 "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッ"
4276 "ファのアドレスと割り当てたサイズを反映した値に更新される。"
4277
4278 #. type: Plain text
4279 #: build/C/man3/getline.3:108
4280 msgid ""
4281 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
4282 "than newline can be specified as the I<delimiter> argument.  As with "
4283 "B<getline>(), a delimiter character is not added if one was not present in "
4284 "the input before end of file was reached."
4285 msgstr ""
4286 "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り"
4287 "文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイ"
4288 "ル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッ"
4289 "ファに追加しない。"
4290
4291 #. type: Plain text
4292 #: build/C/man3/getline.3:117
4293 msgid ""
4294 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
4295 "read, including the delimiter character, but not including the terminating "
4296 "null byte.  This value can be used to handle embedded null bytes in the line "
4297 "read."
4298 msgstr ""
4299 "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文"
4300 "字数には区切り文字は含まれるが、終端に使う NULL バイトは含まれない。 この値に"
4301 "よって、読み込んだ行に含まれる NULL バイトを操作することができる。"
4302
4303 #. type: Plain text
4304 #: build/C/man3/getline.3:120
4305 msgid ""
4306 "Both functions return -1 on failure to read a line (including end-of-file "
4307 "condition)."
4308 msgstr ""
4309 "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達"
4310 "した場合にも -1 を返す)。"
4311
4312 #. type: Plain text
4313 #: build/C/man3/getline.3:130
4314 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
4315 msgstr ""
4316 "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは "
4317 "I<stream> が有効でない)。"
4318
4319 #. type: Plain text
4320 #: build/C/man3/getline.3:132
4321 msgid "These functions are available since libc 4.6.27."
4322 msgstr "これらの関数は libc 4.6.27 以降で利用可能である。"
4323
4324 #. type: Plain text
4325 #: build/C/man3/getline.3:139
4326 msgid ""
4327 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
4328 "were standardized in POSIX.1-2008."
4329 msgstr ""
4330 "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 "
4331 "POSIX.1-2008 で標準化された。"
4332
4333 #. type: Plain text
4334 #: build/C/man3/getline.3:144
4335 #, no-wrap
4336 msgid ""
4337 "#define _GNU_SOURCE\n"
4338 "#include E<lt>stdio.hE<gt>\n"
4339 "#include E<lt>stdlib.hE<gt>\n"
4340 msgstr ""
4341 "#define _GNU_SOURCE\n"
4342 "#include E<lt>stdio.hE<gt>\n"
4343 "#include E<lt>stdlib.hE<gt>\n"
4344
4345 #. type: Plain text
4346 #: build/C/man3/getline.3:152
4347 #, no-wrap
4348 msgid ""
4349 "int\n"
4350 "main(void)\n"
4351 "{\n"
4352 "    FILE *fp;\n"
4353 "    char *line = NULL;\n"
4354 "    size_t len = 0;\n"
4355 "    ssize_t read;\n"
4356 msgstr ""
4357 "int\n"
4358 "main(void)\n"
4359 "{\n"
4360 "    FILE *fp;\n"
4361 "    char *line = NULL;\n"
4362 "    size_t len = 0;\n"
4363 "    ssize_t read;\n"
4364
4365 #. type: Plain text
4366 #: build/C/man3/getline.3:156
4367 #, no-wrap
4368 msgid ""
4369 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4370 "    if (fp == NULL)\n"
4371 "        exit(EXIT_FAILURE);\n"
4372 msgstr ""
4373 "    fp = fopen(\"/etc/motd\", \"r\");\n"
4374 "    if (fp == NULL)\n"
4375 "        exit(EXIT_FAILURE);\n"
4376
4377 #. type: Plain text
4378 #: build/C/man3/getline.3:161
4379 #, no-wrap
4380 msgid ""
4381 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4382 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4383 "        printf(\"%s\", line);\n"
4384 "    }\n"
4385 msgstr ""
4386 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
4387 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
4388 "        printf(\"%s\", line);\n"
4389 "    }\n"
4390
4391 #. type: Plain text
4392 #: build/C/man3/getline.3:165
4393 #, no-wrap
4394 msgid ""
4395 "    free(line);\n"
4396 "    exit(EXIT_SUCCESS);\n"
4397 "}\n"
4398 msgstr ""
4399 "    free(line);\n"
4400 "    exit(EXIT_SUCCESS);\n"
4401 "}\n"
4402
4403 #. type: Plain text
4404 #: build/C/man3/getline.3:173
4405 msgid ""
4406 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4407 msgstr ""
4408 "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
4409
4410 #. type: TH
4411 #: build/C/man3/gets.3:25
4412 #, no-wrap
4413 msgid "GETS"
4414 msgstr "GETS"
4415
4416 #. type: TH
4417 #: build/C/man3/gets.3:25
4418 #, no-wrap
4419 msgid "2012-01-18"
4420 msgstr "2012-01-18"
4421
4422 #. type: Plain text
4423 #: build/C/man3/gets.3:28
4424 msgid ""
4425 "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
4426 msgstr "fgetc, fgets, getc, getchar, gets, ungetc - 文字と文字列の入力"
4427
4428 #. type: Plain text
4429 #: build/C/man3/gets.3:33
4430 #, no-wrap
4431 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
4432 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
4433
4434 #. type: Plain text
4435 #: build/C/man3/gets.3:35
4436 #, no-wrap
4437 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4438 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
4439
4440 #. type: Plain text
4441 #: build/C/man3/gets.3:37
4442 #, no-wrap
4443 msgid "B<int getc(FILE *>I<stream>B<);>\n"
4444 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
4445
4446 #. type: Plain text
4447 #: build/C/man3/gets.3:39
4448 #, no-wrap
4449 msgid "B<int getchar(void);>\n"
4450 msgstr "B<int getchar(void);>\n"
4451
4452 #. type: Plain text
4453 #: build/C/man3/gets.3:41
4454 #, no-wrap
4455 msgid "B<char *gets(char *>I<s>B<);>\n"
4456 msgstr "B<char *gets(char *>I<s>B<);>\n"
4457
4458 #. type: Plain text
4459 #: build/C/man3/gets.3:43
4460 #, no-wrap
4461 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4462 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
4463
4464 #. type: Plain text
4465 #: build/C/man3/gets.3:55
4466 msgid ""
4467 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
4468 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
4469 msgstr ""
4470 "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 "
4471 "I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返"
4472 "す。"
4473
4474 #. type: Plain text
4475 #: build/C/man3/gets.3:62
4476 msgid ""
4477 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
4478 "a macro which evaluates I<stream> more than once."
4479 msgstr ""
4480 "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして"
4481 "実装されているかもしれない。"
4482
4483 #. type: Plain text
4484 #: build/C/man3/gets.3:66
4485 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
4486 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
4487
4488 #. type: Plain text
4489 #: build/C/man3/gets.3:76
4490 msgid ""
4491 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
4492 "until either a terminating newline or B<EOF>, which it replaces with a null "
4493 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
4494 "below)."
4495 msgstr ""
4496 "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指"
4497 "すバッファに格納する (末尾の改行文字や B<EOF> は NULL バイト (\\(aq"
4498 "\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下"
4499 "記の「バグ」を参照)。"
4500
4501 #. type: Plain text
4502 #: build/C/man3/gets.3:90
4503 msgid ""
4504 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
4505 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
4506 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
4507 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
4508 "in the buffer."
4509 msgstr ""
4510 "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が"
4511 "指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止"
4512 "する。 読み込まれた改行文字はバッファに格納される。 終端の NULL バイト (\\(aq"
4513 "\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
4514
4515 #. type: Plain text
4516 #: build/C/man3/gets.3:101
4517 msgid ""
4518 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
4519 "it is available for subsequent read operations.  Pushed-back characters will "
4520 "be returned in reverse order; only one pushback is guaranteed."
4521 msgstr ""
4522 "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> に"
4523 "キャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻"
4524 "しとして保証されているのは、一文字だけである。"
4525
4526 #. type: Plain text
4527 #: build/C/man3/gets.3:106
4528 msgid ""
4529 "Calls to the functions described here can be mixed with each other and with "
4530 "calls to other input functions from the I<stdio> library for the same input "
4531 "stream."
4532 msgstr ""
4533 "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して"
4534 "互いに混ぜて使うことができる。"
4535
4536 #. type: Plain text
4537 #: build/C/man3/gets.3:121
4538 msgid ""
4539 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
4540 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
4541 msgstr ""
4542 "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読ん"
4543 "で I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返"
4544 "す。"
4545
4546 #. type: Plain text
4547 #: build/C/man3/gets.3:129
4548 msgid ""
4549 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
4550 "end of file occurs while no characters have been read."
4551 msgstr ""
4552 "B<gets>()  と B<fgets>()  は、成功すると I<s> を返し、エラーや 1 文字も読み込"
4553 "んでいないのにファイルの終わりになった 場合に NULL を返す。"
4554
4555 #. type: Plain text
4556 #: build/C/man3/gets.3:136
4557 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
4558 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
4559
4560 #. type: Plain text
4561 #: build/C/man3/gets.3:138
4562 msgid "C89, C99, POSIX.1-2001."
4563 msgstr "C89, C99, POSIX.1-2001."
4564
4565 #. type: Plain text
4566 #: build/C/man3/gets.3:150
4567 msgid ""
4568 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
4569 "C11 removes the specification of B<gets>()  from the C language, and since "
4570 "version 2.16, glibc header files don't expose the function declaration if "
4571 "the B<_ISOC11_SOURCE> feature test macro is defined."
4572 msgstr ""
4573 "LSB は B<gets>() を非推奨としている。\n"
4574 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
4575 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
4576 "glibc バージョン 2.16 以降では、機能検査マシン B<_ISOC11_SOURCE> が定義され"
4577 "た\n"
4578 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
4579
4580 #. type: Plain text
4581 #: build/C/man3/gets.3:164
4582 msgid ""
4583 "Never use B<gets>().  Because it is impossible to tell without knowing the "
4584 "data in advance how many characters B<gets>()  will read, and because B<gets>"
4585 "()  will continue to store characters past the end of the buffer, it is "
4586 "extremely dangerous to use.  It has been used to break computer security.  "
4587 "Use B<fgets>()  instead."
4588 msgstr ""
4589 "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに "
4590 "B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを"
4591 "越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用"
4592 "してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこ"
4593 "と。"
4594
4595 #. type: Plain text
4596 #: build/C/man3/gets.3:171
4597 msgid ""
4598 "It is not advisable to mix calls to input functions from the I<stdio> "
4599 "library with low-level calls to B<read>(2)  for the file descriptor "
4600 "associated with the input stream; the results will be undefined and very "
4601 "probably not what you want."
4602 msgstr ""
4603 "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関"
4604 "数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果"
4605 "がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
4606
4607 #. type: Plain text
4608 #: build/C/man3/gets.3:187
4609 msgid ""
4610 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>"
4611 "(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), "
4612 "B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
4613 msgstr ""
4614 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3),\n"
4615 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3),\n"
4616 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3),\n"
4617 "B<feature_test_macros>(7)"
4618
4619 #. type: TH
4620 #: build/C/man3/getw.3:23
4621 #, no-wrap
4622 msgid "GETW"
4623 msgstr "GETW"
4624
4625 #. type: TH
4626 #: build/C/man3/getw.3:23
4627 #, no-wrap
4628 msgid "2010-09-26"
4629 msgstr "2010-09-26"
4630
4631 #. type: Plain text
4632 #: build/C/man3/getw.3:26
4633 msgid "getw, putw - input and output of words (ints)"
4634 msgstr "getw, putw - ワード(int)の入出力"
4635
4636 #. type: Plain text
4637 #: build/C/man3/getw.3:31
4638 #, no-wrap
4639 msgid "B<int getw(FILE *>I<stream>B<);>\n"
4640 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
4641
4642 #. type: Plain text
4643 #: build/C/man3/getw.3:33
4644 #, no-wrap
4645 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4646 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
4647
4648 #. type: Plain text
4649 #: build/C/man3/getw.3:42
4650 msgid "B<getw>(), B<putw>():"
4651 msgstr "B<getw>(), B<putw>():"
4652
4653 #. type: TP
4654 #: build/C/man3/getw.3:45
4655 #, no-wrap
4656 msgid "Since glibc 2.3.3:"
4657 msgstr "glibc 2.3.3 以降:"
4658
4659 #. type: Plain text
4660 #: build/C/man3/getw.3:48
4661 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
4662 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
4663
4664 #. type: Plain text
4665 #: build/C/man3/getw.3:51
4666 #, no-wrap
4667 msgid ""
4668 "(_XOPEN_SOURCE &&\n"
4669 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4670 msgstr ""
4671 "(_XOPEN_SOURCE &&\n"
4672 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
4673
4674 #. type: TP
4675 #: build/C/man3/getw.3:51
4676 #, no-wrap
4677 msgid "Before glibc 2.3.3:"
4678 msgstr "glibc 2.3.3 より前:"
4679
4680 #. type: Plain text
4681 #: build/C/man3/getw.3:54
4682 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4683 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
4684
4685 #. type: Plain text
4686 #: build/C/man3/getw.3:64
4687 msgid ""
4688 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
4689 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
4690 msgstr ""
4691 "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 "
4692 "との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用する"
4693 "ことを勧める。"
4694
4695 #. type: Plain text
4696 #: build/C/man3/getw.3:71
4697 msgid ""
4698 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
4699 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
4700 "instead."
4701 msgstr ""
4702 "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は "
4703 "SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を"
4704 "使用することを勧める。"
4705
4706 #. type: Plain text
4707 #: build/C/man3/getw.3:78
4708 msgid ""
4709 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
4710 "error, they return B<EOF>."
4711 msgstr ""
4712 "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラー"
4713 "が発生した場合、これらの関数は B<EOF> を返す。"
4714
4715 #. type: Plain text
4716 #: build/C/man3/getw.3:80
4717 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
4718 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
4719
4720 #. type: Plain text
4721 #: build/C/man3/getw.3:84
4722 msgid ""
4723 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
4724 "can be used to distinguish between the two cases."
4725 msgstr ""
4726 "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>"
4727 "(3)  を用いると、この二つの場合を区別することが出来る。"
4728
4729 #. type: Plain text
4730 #: build/C/man3/getw.3:90
4731 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4732 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
4733
4734 #. type: TH
4735 #: build/C/man2/link.2:31
4736 #, no-wrap
4737 msgid "LINK"
4738 msgstr "LINK"
4739
4740 #. type: TH
4741 #: build/C/man2/link.2:31
4742 #, no-wrap
4743 msgid "2008-08-21"
4744 msgstr "2008-08-21"
4745
4746 #. type: Plain text
4747 #: build/C/man2/link.2:34
4748 msgid "link - make a new name for a file"
4749 msgstr "link - ファイルの新しい名前を作成する"
4750
4751 #. type: Plain text
4752 #: build/C/man2/link.2:36 build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
4753 #: build/C/man2/readlink.2:46 build/C/man2/rmdir.2:35
4754 #: build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
4755 msgid "B<#include E<lt>unistd.hE<gt>>"
4756 msgstr "B<#include E<lt>unistd.hE<gt>>"
4757
4758 #. type: Plain text
4759 #: build/C/man2/link.2:38
4760 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4761 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
4762
4763 #. type: Plain text
4764 #: build/C/man2/link.2:41
4765 msgid ""
4766 "B<link>()  creates a new link (also known as a hard link) to an existing "
4767 "file."
4768 msgstr ""
4769 "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard "
4770 "link) ともいう) を作成する。"
4771
4772 #. type: Plain text
4773 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
4774 msgid "If I<newpath> exists it will I<not> be overwritten."
4775 msgstr "I<newpath> が存在する場合には上書きはI<されない>。"
4776
4777 #. type: Plain text
4778 #: build/C/man2/link.2:52
4779 msgid ""
4780 "This new name may be used exactly as the old one for any operation; both "
4781 "names refer to the same file (and so have the same permissions and "
4782 "ownership) and it is impossible to tell which name was the \"original\"."
4783 msgstr ""
4784 "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方"
4785 "の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 "
4786 "(ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
4787
4788 #. type: Plain text
4789 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65
4790 #: build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89
4791 #: build/C/man2/unlink.2:60
4792 msgid ""
4793 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
4794 "appropriately."
4795 msgstr ""
4796 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
4797 "定される。"
4798
4799 #. type: TP
4800 #: build/C/man2/link.2:58 build/C/man2/open.2:473 build/C/man2/readlink.2:84
4801 #: build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90
4802 #: build/C/man3/tmpfile.3:53 build/C/man2/unlink.2:61
4803 #, no-wrap
4804 msgid "B<EACCES>"
4805 msgstr "B<EACCES>"
4806
4807 #. type: Plain text
4808 #: build/C/man2/link.2:69
4809 msgid ""
4810 "Write access to the directory containing I<newpath> is denied, or search "
4811 "permission is denied for one of the directories in the path prefix of "
4812 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4813 msgstr ""
4814 "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 "
4815 "I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない "
4816 "(B<path_resolution>(7)  を参照)。"
4817
4818 #. type: TP
4819 #: build/C/man2/link.2:69 build/C/man2/open.2:482 build/C/man2/symlink.2:99
4820 #: build/C/man3/tmpfile.3:56
4821 #, no-wrap
4822 msgid "B<EEXIST>"
4823 msgstr "B<EEXIST>"
4824
4825 #. type: Plain text
4826 #: build/C/man2/link.2:73 build/C/man2/symlink.2:103
4827 msgid "I<newpath> already exists."
4828 msgstr "I<newpath> が既に存在する。"
4829
4830 #. type: TP
4831 #: build/C/man2/link.2:73 build/C/man2/llseek.2:69 build/C/man2/open.2:488
4832 #: build/C/man2/pipe.2:98 build/C/man2/read.2:100 build/C/man2/readlink.2:89
4833 #: build/C/man2/rename.2:133 build/C/man2/rmdir.2:64
4834 #: build/C/man2/symlink.2:103 build/C/man2/unlink.2:80
4835 #: build/C/man2/write.2:135 build/C/man2/process_vm_readv.2:249
4836 #: build/C/man2/process_vm_readv.2:254
4837 #, no-wrap
4838 msgid "B<EFAULT>"
4839 msgstr "B<EFAULT>"
4840
4841 #. type: Plain text
4842 #: build/C/man2/link.2:76 build/C/man2/rename.2:136 build/C/man2/symlink.2:106
4843 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
4844 msgstr ""
4845 "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
4846
4847 #. type: TP
4848 #: build/C/man2/link.2:76 build/C/man2/read.2:129 build/C/man2/readlink.2:105
4849 #: build/C/man2/symlink.2:106 build/C/man2/unlink.2:84
4850 #: build/C/man2/write.2:159
4851 #, no-wrap
4852 msgid "B<EIO>"
4853 msgstr "B<EIO>"
4854
4855 #. type: Plain text
4856 #: build/C/man2/link.2:79 build/C/man2/symlink.2:109 build/C/man2/unlink.2:87
4857 msgid "An I/O error occurred."
4858 msgstr "I/O エラーが発生した。"
4859
4860 #. type: TP
4861 #: build/C/man2/link.2:79 build/C/man2/open.2:512 build/C/man2/readlink.2:108
4862 #: build/C/man2/rename.2:146 build/C/man2/rmdir.2:73
4863 #: build/C/man2/symlink.2:109 build/C/man2/unlink.2:92
4864 #, no-wrap
4865 msgid "B<ELOOP>"
4866 msgstr "B<ELOOP>"
4867
4868 #. type: Plain text
4869 #: build/C/man2/link.2:83 build/C/man2/rename.2:150
4870 msgid ""
4871 "Too many symbolic links were encountered in resolving I<oldpath> or "
4872 "I<newpath>."
4873 msgstr ""
4874 "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎ"
4875 "る。"
4876
4877 #. type: TP
4878 #: build/C/man2/link.2:83 build/C/man2/rename.2:150
4879 #, no-wrap
4880 msgid "B<EMLINK>"
4881 msgstr "B<EMLINK>"
4882
4883 #. type: Plain text
4884 #: build/C/man2/link.2:88
4885 msgid ""
4886 "The file referred to by I<oldpath> already has the maximum number of links "
4887 "to it."
4888 msgstr ""
4889 "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
4890
4891 #. type: TP
4892 #: build/C/man2/link.2:88 build/C/man2/open.2:522 build/C/man2/readlink.2:111
4893 #: build/C/man2/rename.2:157 build/C/man2/rmdir.2:77
4894 #: build/C/man2/symlink.2:113 build/C/man2/unlink.2:96
4895 #, no-wrap
4896 msgid "B<ENAMETOOLONG>"
4897 msgstr "B<ENAMETOOLONG>"
4898
4899 #. type: Plain text
4900 #: build/C/man2/link.2:91 build/C/man2/rename.2:160 build/C/man2/symlink.2:116
4901 msgid "I<oldpath> or I<newpath> was too long."
4902 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
4903
4904 #. type: TP
4905 #: build/C/man2/link.2:91 build/C/man2/open.2:536 build/C/man2/readlink.2:114
4906 #: build/C/man2/rename.2:160 build/C/man2/rmdir.2:80
4907 #: build/C/man2/symlink.2:116 build/C/man2/unlink.2:99
4908 #, no-wrap
4909 msgid "B<ENOENT>"
4910 msgstr "B<ENOENT>"
4911
4912 #. type: Plain text
4913 #: build/C/man2/link.2:96
4914 msgid ""
4915 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
4916 "dangling symbolic link."
4917 msgstr ""
4918 "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた"
4919 "(dangling)シンボリックリンクである。"
4920
4921 #. type: TP
4922 #: build/C/man2/link.2:96 build/C/man2/open.2:543 build/C/man2/readlink.2:117
4923 #: build/C/man2/rename.2:173 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:568
4924 #: build/C/man2/symlink.2:123 build/C/man3/tempnam.3:91
4925 #: build/C/man2/unlink.2:106 build/C/man2/process_vm_readv.2:260
4926 #, no-wrap
4927 msgid "B<ENOMEM>"
4928 msgstr "B<ENOMEM>"
4929
4930 #. type: Plain text
4931 #: build/C/man2/link.2:99 build/C/man2/open.2:546 build/C/man2/readlink.2:120
4932 #: build/C/man2/rename.2:176 build/C/man2/rmdir.2:88
4933 #: build/C/man2/symlink.2:126 build/C/man2/unlink.2:109
4934 msgid "Insufficient kernel memory was available."
4935 msgstr "十分なカーネルメモリーがない。"
4936
4937 #. type: TP
4938 #: build/C/man2/link.2:99 build/C/man2/open.2:546 build/C/man2/rename.2:176
4939 #: build/C/man2/symlink.2:126 build/C/man3/tmpfile.3:68
4940 #: build/C/man2/write.2:162
4941 #, no-wrap
4942 msgid "B<ENOSPC>"
4943 msgstr "B<ENOSPC>"
4944
4945 #. type: Plain text
4946 #: build/C/man2/link.2:103 build/C/man2/rename.2:180
4947 #: build/C/man2/symlink.2:130
4948 msgid "The device containing the file has no room for the new directory entry."
4949 msgstr ""
4950 "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための"
4951 "空きがない。"
4952
4953 #. type: TP
4954 #: build/C/man2/link.2:103 build/C/man2/open.2:552 build/C/man2/readlink.2:120
4955 #: build/C/man2/rename.2:180 build/C/man2/rmdir.2:88
4956 #: build/C/man2/symlink.2:130 build/C/man2/unlink.2:109
4957 #, no-wrap
4958 msgid "B<ENOTDIR>"
4959 msgstr "B<ENOTDIR>"
4960
4961 #. type: Plain text
4962 #: build/C/man2/link.2:108
4963 msgid ""
4964 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
4965 "a directory."
4966 msgstr ""
4967 "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでな"
4968 "い。"
4969
4970 #. type: TP
4971 #: build/C/man2/link.2:108 build/C/man2/link.2:112 build/C/man2/open.2:585
4972 #: build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118
4973 #: build/C/man2/symlink.2:135 build/C/man2/unlink.2:114
4974 #: build/C/man2/process_vm_readv.2:265
4975 #, no-wrap
4976 msgid "B<EPERM>"
4977 msgstr "B<EPERM>"
4978
4979 #. type: Plain text
4980 #: build/C/man2/link.2:112
4981 msgid "I<oldpath> is a directory."
4982 msgstr "I<oldpath> がディレクトリである。"
4983
4984 #. type: Plain text
4985 #: build/C/man2/link.2:117
4986 msgid ""
4987 "The file system containing I<oldpath> and I<newpath> does not support the "
4988 "creation of hard links."
4989 msgstr ""
4990 "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポート"
4991 "していない。"
4992
4993 #. type: TP
4994 #: build/C/man2/link.2:117 build/C/man2/open.2:593 build/C/man2/rename.2:218
4995 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:140
4996 #: build/C/man3/tmpfile.3:71 build/C/man2/unlink.2:137
4997 #, no-wrap
4998 msgid "B<EROFS>"
4999 msgstr "B<EROFS>"
5000
5001 #. type: Plain text
5002 #: build/C/man2/link.2:120 build/C/man2/rename.2:221
5003 msgid "The file is on a read-only file system."
5004 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
5005
5006 #. type: TP
5007 #: build/C/man2/link.2:120 build/C/man2/rename.2:221
5008 #, no-wrap
5009 msgid "B<EXDEV>"
5010 msgstr "B<EXDEV>"
5011
5012 #. type: Plain text
5013 #: build/C/man2/link.2:128
5014 msgid ""
5015 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
5016 "permits a file system to be mounted at multiple points, but B<link>()  does "
5017 "not work across different mount points, even if the same file system is "
5018 "mounted on both.)"
5019 msgstr ""
5020 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
5021 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
5022 "している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々"
5023 "のマウント位置を跨いでは動作しない。)"
5024
5025 #.  SVr4 documents additional ENOLINK and
5026 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
5027 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
5028 #. type: Plain text
5029 #: build/C/man2/link.2:133
5030 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
5031 msgstr "SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照)。"
5032
5033 #. type: Plain text
5034 #: build/C/man2/link.2:140
5035 msgid ""
5036 "Hard links, as created by B<link>(), cannot span file systems.  Use "
5037 "B<symlink>(2)  if this is required."
5038 msgstr ""
5039 "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 "
5040 "このような場合は B<symlink>(2)  を使用すること。"
5041
5042 #.  more precisely: since kernel 1.3.56
5043 #.  For example, the default Solaris compilation environment
5044 #.  behaves like Linux, and contributors to a March 2005
5045 #.  thread in the Austin mailing list reported that some
5046 #.  other (System V) implementations did/do the same -- MTK, Apr 05
5047 #. type: Plain text
5048 #: build/C/man2/link.2:171
5049 msgid ""
5050 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
5051 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
5052 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
5053 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
5054 "the same file that I<oldpath> refers to).  Some other implementations behave "
5055 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
5056 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
5057 "dereferenced if it is a symbolic link.  For precise control over the "
5058 "treatment of symbolic links when creating a link, see B<linkat>(2)."
5059 msgstr ""
5060 "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  "
5061 "は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル "
5062 "2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンク"
5063 "である場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンク"
5064 "として作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイル"
5065 "へのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作"
5066 "する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボ"
5067 "リックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存と"
5068 "なった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御に 関して"
5069 "は B<linkat>(2)  を参照のこと。"
5070
5071 #. type: Plain text
5072 #: build/C/man2/link.2:177
5073 msgid ""
5074 "On NFS file systems, the return code may be wrong in case the NFS server "
5075 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
5076 "to find out if the link got created."
5077 msgstr ""
5078 "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前"
5079 "に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つける"
5080 "ためには B<stat>(2)  を使用すること。"
5081
5082 #. type: Plain text
5083 #: build/C/man2/link.2:187
5084 msgid ""
5085 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5086 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5087 msgstr ""
5088 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
5089 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
5090
5091 #. type: TH
5092 #: build/C/man2/llseek.2:26
5093 #, no-wrap
5094 msgid "LLSEEK"
5095 msgstr "LLSEEK"
5096
5097 #. type: TH
5098 #: build/C/man2/llseek.2:26
5099 #, no-wrap
5100 msgid "2007-06-01"
5101 msgstr "2007-06-01"
5102
5103 #. type: Plain text
5104 #: build/C/man2/llseek.2:29
5105 msgid "_llseek - reposition read/write file offset"
5106 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
5107
5108 #. type: Plain text
5109 #: build/C/man2/llseek.2:33
5110 #, no-wrap
5111 msgid ""
5112 "B<#include E<lt>sys/types.hE<gt>>\n"
5113 "B<#include E<lt>unistd.hE<gt>>\n"
5114 msgstr ""
5115 "B<#include E<lt>sys/types.hE<gt>>\n"
5116 "B<#include E<lt>unistd.hE<gt>>\n"
5117
5118 #. type: Plain text
5119 #: build/C/man2/llseek.2:37
5120 #, no-wrap
5121 msgid ""
5122 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5123 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5124 "B<            unsigned int >I<whence>B<);>\n"
5125 msgstr ""
5126 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
5127 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
5128 "B<            unsigned int >I<whence>B<);>\n"
5129
5130 #. type: Plain text
5131 #: build/C/man2/llseek.2:57
5132 msgid ""
5133 "The B<_llseek>()  function repositions the offset of the open file "
5134 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
5135 "offset_low> bytes relative to the beginning of the file, the current "
5136 "position in the file, or the end of the file, depending on whether I<whence> "
5137 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
5138 "resulting file position in the argument I<result>."
5139 msgstr ""
5140 "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけら"
5141 "れたオープンされたファイルのオフセットの位置を、相対的に I<"
5142 "(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を"
5143 "表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定"
5144 "し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果"
5145 "のファイル位置を I<result> 引き数に返す。"
5146
5147 #. type: Plain text
5148 #: build/C/man2/llseek.2:64
5149 msgid ""
5150 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
5151 "-1 is returned and I<errno> is set to indicate the error."
5152 msgstr ""
5153 "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、"
5154 "エラーを示す I<errno> が設定される。"
5155
5156 #. type: Plain text
5157 #: build/C/man2/llseek.2:69 build/C/man2/lseek.2:164
5158 msgid "I<fd> is not an open file descriptor."
5159 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
5160
5161 #. type: Plain text
5162 #: build/C/man2/llseek.2:72
5163 msgid "Problem with copying results to user space."
5164 msgstr "結果をユーザ空間にコピーするときに問題があった。"
5165
5166 #. type: Plain text
5167 #: build/C/man2/llseek.2:76
5168 msgid "I<whence> is invalid."
5169 msgstr "I<whence> が不正である。"
5170
5171 #. type: Plain text
5172 #: build/C/man2/llseek.2:79
5173 msgid ""
5174 "This function is Linux-specific, and should not be used in programs intended "
5175 "to be portable."
5176 msgstr ""
5177 "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
5178
5179 #. type: Plain text
5180 #: build/C/man2/llseek.2:82
5181 msgid ""
5182 "Glibc does not provide a wrapper for this system call; call it using "
5183 "B<syscall>(2)."
5184 msgstr ""
5185 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
5186 "(2)  を使って呼び出すこと。"
5187
5188 #. type: Plain text
5189 #: build/C/man2/llseek.2:85
5190 msgid "B<lseek>(2), B<lseek64>(3)"
5191 msgstr "B<lseek>(2), B<lseek64>(3)"
5192
5193 #. type: TH
5194 #: build/C/man2/lseek.2:45
5195 #, no-wrap
5196 msgid "LSEEK"
5197 msgstr "LSEEK"
5198
5199 #. type: TH
5200 #: build/C/man2/lseek.2:45
5201 #, no-wrap
5202 msgid "2011-09-25"
5203 msgstr "2011-09-25"
5204
5205 #. type: Plain text
5206 #: build/C/man2/lseek.2:48
5207 msgid "lseek - reposition read/write file offset"
5208 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
5209
5210 #. type: Plain text
5211 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:30
5212 msgid "B<#include E<lt>sys/types.hE<gt>>"
5213 msgstr "B<#include E<lt>sys/types.hE<gt>>"
5214
5215 #. type: Plain text
5216 #: build/C/man2/lseek.2:54
5217 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5218 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
5219
5220 #. type: Plain text
5221 #: build/C/man2/lseek.2:65
5222 msgid ""
5223 "The B<lseek>()  function repositions the offset of the open file associated "
5224 "with the file descriptor I<fd> to the argument I<offset> according to the "
5225 "directive I<whence> as follows:"
5226 msgstr ""
5227 "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオー"
5228 "プンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置"
5229 "へ以下のように変更する:"
5230
5231 #. type: Plain text
5232 #: build/C/man2/lseek.2:70
5233 msgid "The offset is set to I<offset> bytes."
5234 msgstr "オフセットは I<offset> バイトに設定される。"
5235
5236 #. type: Plain text
5237 #: build/C/man2/lseek.2:75
5238 msgid "The offset is set to its current location plus I<offset> bytes."
5239 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
5240
5241 #. type: Plain text
5242 #: build/C/man2/lseek.2:80
5243 msgid "The offset is set to the size of the file plus I<offset> bytes."
5244 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
5245
5246 #. type: Plain text
5247 #: build/C/man2/lseek.2:88
5248 msgid ""
5249 "The B<lseek>()  function allows the file offset to be set beyond the end of "
5250 "the file (but this does not change the size of the file).  If data is later "
5251 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
5252 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
5253 "gap."
5254 msgstr ""
5255 "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但"
5256 "し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置"
5257 "以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 "
5258 "実際にそこにデータを書き込まれるまでは NULL バイト (\\(aq\\e0\\(aq) の列が返"
5259 "される。"
5260
5261 #. type: SS
5262 #: build/C/man2/lseek.2:88
5263 #, no-wrap
5264 msgid "Seeking file data and holes"
5265 msgstr ""
5266
5267 #. type: Plain text
5268 #: build/C/man2/lseek.2:91
5269 msgid ""
5270 "Since version 3.1, Linux supports the following additional values for "
5271 "I<whence>:"
5272 msgstr ""
5273 "Linux バージョン 3.1 以降では、\n"
5274 "I<whence> に以下の値も指定することができる。"
5275
5276 #. type: TP
5277 #: build/C/man2/lseek.2:91
5278 #, no-wrap
5279 msgid "B<SEEK_DATA>"
5280 msgstr "B<SEEK_DATA>"
5281
5282 #. type: Plain text
5283 #: build/C/man2/lseek.2:102
5284 msgid ""
5285 "Adjust the file offset to the next location in the file greater than or "
5286 "equal to I<offset> containing data.  If I<offset> points to data, then the "
5287 "file offset is set to I<offset>."
5288 msgstr ""
5289
5290 #. type: TP
5291 #: build/C/man2/lseek.2:102
5292 #, no-wrap
5293 msgid "B<SEEK_HOLE>"
5294 msgstr "B<SEEK_HOLE>"
5295
5296 #. type: Plain text
5297 #: build/C/man2/lseek.2:116
5298 msgid ""
5299 "Adjust the file offset to the next hole in the file greater than or equal to "
5300 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
5301 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
5302 "file offset is adjusted to the end of the file (i.e., there is an implicit "
5303 "hole at the end of any file)."
5304 msgstr ""
5305
5306 #. type: Plain text
5307 #: build/C/man2/lseek.2:122
5308 msgid ""
5309 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
5310 "end of the file."
5311 msgstr ""
5312
5313 #. type: Plain text
5314 #: build/C/man2/lseek.2:128
5315 msgid ""
5316 "These operations allow applications to map holes in a sparsely allocated "
5317 "file.  This can be useful for applications such as file backup tools, which "
5318 "can save space when creating backups and preserve holes, if they have a "
5319 "mechanism for discovering holes."
5320 msgstr ""
5321
5322 #.  https://lkml.org/lkml/2011/4/22/79
5323 #.  http://lwn.net/Articles/440255/
5324 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
5325 #. type: Plain text
5326 #: build/C/man2/lseek.2:151
5327 msgid ""
5328 "For the purposes of these operations, a hole is a sequence of zeros that "
5329 "(normally) has not been allocated in the underlying file storage.  However, "
5330 "a file system is not obliged to report holes, so these operations are not a "
5331 "guaranteed mechanism for mapping the storage space actually allocated to a "
5332 "file.  (Furthermore, a sequence of zeros that actually has been written to "
5333 "the underlying storage may not be reported as a hole.)  In the simplest "
5334 "implementation, a file system can support the operations by making "
5335 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
5336 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
5337 "by I<offset> is a hole, it can be considered to consist of data that is a "
5338 "sequence of zeros)."
5339 msgstr ""
5340
5341 #. type: Plain text
5342 #: build/C/man2/lseek.2:159
5343 msgid ""
5344 "Upon successful completion, B<lseek>()  returns the resulting offset "
5345 "location as measured in bytes from the beginning of the file.  On error, the "
5346 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
5347 msgstr ""
5348 "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数"
5349 "で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示"
5350 "される。"
5351
5352 #.  Some systems may allow negative offsets for character devices
5353 #.  and/or for remote file systems.
5354 #. type: Plain text
5355 #: build/C/man2/lseek.2:172
5356 msgid ""
5357 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
5358 "beyond the end of a seekable device."
5359 msgstr ""
5360 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
5361 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
5362
5363 #. type: TP
5364 #: build/C/man2/lseek.2:172 build/C/man2/open.2:565
5365 #, no-wrap
5366 msgid "B<EOVERFLOW>"
5367 msgstr "B<EOVERFLOW>"
5368
5369 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
5370 #. type: Plain text
5371 #: build/C/man2/lseek.2:177
5372 msgid "The resulting file offset cannot be represented in an I<off_t>."
5373 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
5374
5375 #. type: TP
5376 #: build/C/man2/lseek.2:177
5377 #, no-wrap
5378 msgid "B<ESPIPE>"
5379 msgstr "B<ESPIPE>"
5380
5381 #. type: Plain text
5382 #: build/C/man2/lseek.2:181
5383 msgid "I<fd> is associated with a pipe, socket, or FIFO."
5384 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
5385
5386 #. type: TP
5387 #: build/C/man2/lseek.2:181 build/C/man2/open.2:559
5388 #, no-wrap
5389 msgid "B<ENXIO>"
5390 msgstr "B<ENXIO>"
5391
5392 #. type: Plain text
5393 #: build/C/man2/lseek.2:189
5394 msgid ""
5395 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
5396 "beyond the end of the file."
5397 msgstr ""
5398 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
5399 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
5400
5401 #.  SVr4 documents additional error
5402 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
5403 #. type: Plain text
5404 #: build/C/man2/lseek.2:191 build/C/man2/read.2:157 build/C/man2/rmdir.2:129
5405 #: build/C/man2/symlink.2:150 build/C/man2/unlink.2:145
5406 #: build/C/man2/write.2:183
5407 msgid "SVr4, 4.3BSD, POSIX.1-2001."
5408 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
5409
5410 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
5411 #. type: Plain text
5412 #: build/C/man2/lseek.2:199
5413 msgid ""
5414 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
5415 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
5416 "next POSIX revision (Issue 8)."
5417 msgstr ""
5418
5419 #. type: Plain text
5420 #: build/C/man2/lseek.2:203
5421 msgid ""
5422 "Some devices are incapable of seeking and POSIX does not specify which "
5423 "devices must support B<lseek>()."
5424 msgstr ""
5425 "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  "
5426 "に対応すべきかは規定していない。"
5427
5428 #.  Other systems return the number of written characters,
5429 #.  using SEEK_SET to set the counter. (Of written characters.)
5430 #. type: Plain text
5431 #: build/C/man2/lseek.2:210
5432 msgid "On Linux, using B<lseek>()  on a tty device returns B<ESPIPE>."
5433 msgstr ""
5434 "Linux では、 tty デバイスに B<lseek>()  を使用すると B<ESPIPE> を返す。"
5435
5436 #. type: Plain text
5437 #: build/C/man2/lseek.2:213
5438 msgid ""
5439 "When converting old code, substitute values for I<whence> with the following "
5440 "macros:"
5441 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
5442
5443 #. type: tbl table
5444 #: build/C/man2/lseek.2:216
5445 #, no-wrap
5446 msgid "old\tnew\n"
5447 msgstr "old \tnew\n"
5448
5449 #. type: tbl table
5450 #: build/C/man2/lseek.2:217
5451 #, no-wrap
5452 msgid "0\tSEEK_SET\n"
5453 msgstr "0\tSEEK_SET\n"
5454
5455 #. type: tbl table
5456 #: build/C/man2/lseek.2:218
5457 #, no-wrap
5458 msgid "1\tSEEK_CUR\n"
5459 msgstr "1\tSEEK_CUR\n"
5460
5461 #. type: tbl table
5462 #: build/C/man2/lseek.2:219
5463 #, no-wrap
5464 msgid "2\tSEEK_END\n"
5465 msgstr "2\tSEEK_END\n"
5466
5467 #. type: tbl table
5468 #: build/C/man2/lseek.2:220
5469 #, no-wrap
5470 msgid "L_SET\tSEEK_SET\n"
5471 msgstr "L_SET\tSEEK_SET\n"
5472
5473 #. type: tbl table
5474 #: build/C/man2/lseek.2:221
5475 #, no-wrap
5476 msgid "L_INCR\tSEEK_CUR\n"
5477 msgstr "L_INCR\tSEEK_CUR\n"
5478
5479 #. type: tbl table
5480 #: build/C/man2/lseek.2:222
5481 #, no-wrap
5482 msgid "L_XTND\tSEEK_END\n"
5483 msgstr "L_XTND\tSEEK_END\n"
5484
5485 #. type: Plain text
5486 #: build/C/man2/lseek.2:234
5487 msgid ""
5488 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
5489 "current file position pointer, so seeking on such files may be subject to "
5490 "race conditions."
5491 msgstr ""
5492 "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイ"
5493 "ル位置ポインタ (current file position pointer) を共有しているので、 このよう"
5494 "なファイルで移動を行うと競合状態を引き起こす可能性がある。"
5495
5496 #. type: Plain text
5497 #: build/C/man2/lseek.2:241
5498 msgid ""
5499 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5500 "B<posix_fallocate>(3)"
5501 msgstr ""
5502 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
5503 "B<posix_fallocate>(3)"
5504
5505 #. type: TH
5506 #: build/C/man3/lseek64.3:23
5507 #, no-wrap
5508 msgid "LSEEK64"
5509 msgstr "LSEEK64"
5510
5511 #. type: TH
5512 #: build/C/man3/lseek64.3:23
5513 #, no-wrap
5514 msgid "2004-12-11"
5515 msgstr "2004-12-11"
5516
5517 #. type: Plain text
5518 #: build/C/man3/lseek64.3:26
5519 msgid "lseek64 - reposition 64-bit read/write file offset"
5520 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
5521
5522 #. type: Plain text
5523 #: build/C/man3/lseek64.3:28
5524 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
5525 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
5526
5527 #. type: Plain text
5528 #: build/C/man3/lseek64.3:34
5529 msgid ""
5530 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5531 msgstr ""
5532 "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
5533
5534 #. type: Plain text
5535 #: build/C/man3/lseek64.3:51
5536 msgid ""
5537 "The B<lseek>(2)  family of functions reposition the offset of the open file "
5538 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
5539 "start, current position, or end of the file, when I<whence> has the value "
5540 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
5541 msgstr ""
5542 "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープ"
5543 "ンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から "
5544 "I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, "
5545 "B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
5546
5547 #. type: Plain text
5548 #: build/C/man3/lseek64.3:54
5549 msgid "For more details, return value, and errors, see B<lseek>(2)."
5550 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
5551
5552 #. type: Plain text
5553 #: build/C/man3/lseek64.3:61
5554 msgid ""
5555 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
5556 "the raw system call B<_llseek>(2)."
5557 msgstr ""
5558 "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>"
5559 "(2)  と元となるシステムコール B<_llseek>(2)  である。"
5560
5561 #. type: SS
5562 #: build/C/man3/lseek64.3:61
5563 #, no-wrap
5564 msgid "lseek"
5565 msgstr "lseek"
5566
5567 #. type: Plain text
5568 #: build/C/man3/lseek64.3:63 build/C/man3/lseek64.3:85
5569 #: build/C/man3/lseek64.3:114
5570 msgid "Prototype:"
5571 msgstr "プロトタイプ:"
5572
5573 #. type: Plain text
5574 #: build/C/man3/lseek64.3:67
5575 #, no-wrap
5576 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5577 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
5578
5579 #. type: Plain text
5580 #: build/C/man3/lseek64.3:75
5581 msgid ""
5582 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
5583 "architectures, unless one compiles with"
5584 msgstr ""
5585 "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 "
5586 "ビット符号付き型である。 ただし、"
5587
5588 #. type: Plain text
5589 #: build/C/man3/lseek64.3:83
5590 msgid "in which case it is a 64-bit signed type."
5591 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
5592
5593 #. type: SS
5594 #: build/C/man3/lseek64.3:83
5595 #, no-wrap
5596 msgid "lseek64"
5597 msgstr "lseek64"
5598
5599 #. type: Plain text
5600 #: build/C/man3/lseek64.3:89
5601 #, no-wrap
5602 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5603 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
5604
5605 #. type: Plain text
5606 #: build/C/man3/lseek64.3:100
5607 msgid ""
5608 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
5609 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
5610 "when one compiles with"
5611 msgstr ""
5612 "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビッ"
5613 "ト型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイ"
5614 "ルした場合にのみ使用可能である。"
5615
5616 #. type: Plain text
5617 #: build/C/man3/lseek64.3:104
5618 #, no-wrap
5619 msgid "#define _LARGEFILE64_SOURCE\n"
5620 msgstr "#define _LARGEFILE64_SOURCE\n"
5621
5622 #.  in glibc 2.0.94, not in 2.0.6
5623 #. type: Plain text
5624 #: build/C/man3/lseek64.3:112
5625 msgid ""
5626 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
5627 "be an alias for B<llseek>()."
5628 msgstr ""
5629 "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリ"
5630 "アスとして定義されている。"
5631
5632 #. type: SS
5633 #: build/C/man3/lseek64.3:112
5634 #, no-wrap
5635 msgid "llseek"
5636 msgstr "llseek"
5637
5638 #. type: Plain text
5639 #: build/C/man3/lseek64.3:118
5640 #, no-wrap
5641 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5642 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
5643
5644 #.  in libc 5.0.9, not in 4.7.6
5645 #. type: Plain text
5646 #: build/C/man3/lseek64.3:137
5647 msgid ""
5648 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>"
5649 "()  is available in libc5 and glibc and works without special defines.  Its "
5650 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
5651 "provide a prototype.  This is bad, since a prototype is needed.  Users "
5652 "should add the above prototype, or something equivalent, to their own "
5653 "source.  When users complained about data loss caused by a miscompilation of "
5654 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
5655 msgstr ""
5656 "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>()  "
5657 "は libc5 と glibc で使用可能であり、特別な定義なしに動作する。 このプロトタイ"
5658 "プは、libc5 では I<E<lt>unistd.hE<gt>> で与えられるが、glibc はプロトタイプを"
5659 "提供しない。 これはプロトタイプが必要になるので良くない。 ユーザは上記のプロ"
5660 "トタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 こ"
5661 "のデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情が"
5662 "ユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
5663
5664 #. type: Plain text
5665 #: build/C/man3/lseek64.3:140
5666 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5667 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
5668
5669 #. type: Plain text
5670 #: build/C/man3/lseek64.3:144
5671 msgid ""
5672 "This makes this function unusable if one desires a warning-free compilation."
5673 msgstr ""
5674 "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
5675
5676 #. type: SS
5677 #: build/C/man3/lseek64.3:144
5678 #, no-wrap
5679 msgid "_llseek"
5680 msgstr "_llseek"
5681
5682 #. type: Plain text
5683 #: build/C/man3/lseek64.3:147
5684 msgid ""
5685 "All the above functions are implemented in terms of this system call.  The "
5686 "prototype is:"
5687 msgstr ""
5688 "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以"
5689 "下の通り:"
5690
5691 #. type: Plain text
5692 #: build/C/man3/lseek64.3:152
5693 #, no-wrap
5694 msgid ""
5695 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5696 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5697 msgstr ""
5698 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
5699 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
5700
5701 #. type: Plain text
5702 #: build/C/man3/lseek64.3:157
5703 msgid "For more details, see B<llseek>(2)."
5704 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
5705
5706 #. type: Plain text
5707 #: build/C/man3/lseek64.3:160
5708 msgid "B<llseek>(2), B<lseek>(2)"
5709 msgstr "B<llseek>(2), B<lseek>(2)"
5710
5711 #. type: TH
5712 #: build/C/man2/open.2:52
5713 #, no-wrap
5714 msgid "OPEN"
5715 msgstr "OPEN"
5716
5717 #. type: TH
5718 #: build/C/man2/open.2:52
5719 #, no-wrap
5720 msgid "2012-02-27"
5721 msgstr "2012-02-27"
5722
5723 #. type: Plain text
5724 #: build/C/man2/open.2:55
5725 msgid "open, creat - open and possibly create a file or device"
5726 msgstr "open, creat - ファイルやデバイスのオープン、作成を行う"
5727
5728 #. type: Plain text
5729 #: build/C/man2/open.2:60
5730 #, no-wrap
5731 msgid ""
5732 "B<#include E<lt>sys/types.hE<gt>>\n"
5733 "B<#include E<lt>sys/stat.hE<gt>>\n"
5734 "B<#include E<lt>fcntl.hE<gt>>\n"
5735 msgstr ""
5736 "B<#include E<lt>sys/types.hE<gt>>\n"
5737 "B<#include E<lt>sys/stat.hE<gt>>\n"
5738 "B<#include E<lt>fcntl.hE<gt>>\n"
5739
5740 #. type: Plain text
5741 #: build/C/man2/open.2:63
5742 #, no-wrap
5743 msgid ""
5744 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5745 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5746 msgstr ""
5747 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
5748 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
5749
5750 #. type: Plain text
5751 #: build/C/man2/open.2:65
5752 #, no-wrap
5753 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5754 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
5755
5756 #. type: Plain text
5757 #: build/C/man2/open.2:76
5758 msgid ""
5759 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
5760 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
5761 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
5762 "by a successful call will be the lowest-numbered file descriptor not "
5763 "currently open for the process."
5764 msgstr ""
5765 "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返"
5766 "す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), "
5767 "B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数であ"
5768 "る。 このシステムコールが成功した場合に返されるファイルディスクリプタは その"
5769 "プロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字"
5770 "のものとなる。"
5771
5772 #. type: Plain text
5773 #: build/C/man2/open.2:88
5774 msgid ""
5775 "By default, the new file descriptor is set to remain open across an B<execve>"
5776 "(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  "
5777 "is initially disabled; the B<O_CLOEXEC> flag, described below, can be used "
5778 "to change this default).  The file offset is set to the beginning of the "
5779 "file (see B<lseek>(2))."
5780 msgstr ""
5781 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
5782 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
5783 "ファイルディスクリプタフラグは最初は無効である; 後述の B<O_CLOEXEC> フラグ\n"
5784 "を使うとこのデフォルトを変更することができる)。 ファイルオフセット \n"
5785 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
5786
5787 #. type: Plain text
5788 #: build/C/man2/open.2:107
5789 msgid ""
5790 "A call to B<open>()  creates a new I<open file description>, an entry in the "
5791 "system-wide table of open files.  This entry records the file offset and the "
5792 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
5793 "file descriptor is a reference to one of these entries; this reference is "
5794 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
5795 "different file.  The new open file description is initially not shared with "
5796 "any other process, but sharing may arise via B<fork>(2)."
5797 msgstr ""
5798 "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> "
5799 "が作成される。ファイル記述とは、システム全体の オープン中のファイルのテーブル"
5800 "のエントリである。 このエントリは、ファイルオフセットとファイル状態フラグ "
5801 "(B<fcntl>(2)  B<F_SETFL> 操作により変更可能) が保持する。 ファイルディスクリ"
5802 "プタはこれらのエントリの一つへの参照である。 この後で I<pathname> が削除され"
5803 "たり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けな"
5804 "い。 新しいオープンファイル記述は最初は他のどのプロセスとも 共有されていない"
5805 "が、 B<fork>(2)  で共有が起こる場合がある。"
5806
5807 #. type: Plain text
5808 #: build/C/man2/open.2:115
5809 msgid ""
5810 "The argument I<flags> must include one of the following I<access modes>: "
5811 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-"
5812 "only, write-only, or read/write, respectively."
5813 msgstr ""
5814 "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のど"
5815 "れかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み"
5816 "専用、読み書き用に ファイルをオープンすることを要求するものである。"
5817
5818 #.  FIXME . Actually is it true that the "file status flags" are all of the
5819 #.  remaining flags listed below?  SUSv4 divides the flags into:
5820 #.  * Access mode
5821 #.  * File creation
5822 #.  * File status
5823 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
5824 #.  though it's not clear what the difference between "other" and
5825 #.  "File creation" flags is.  (I've raised an Aardvark to see if this
5826 #.  can be clarified in SUSv4; 10 Oct 2008.)
5827 #. type: Plain text
5828 #: build/C/man2/open.2:142
5829 msgid ""
5830 "In addition, zero or more file creation flags and file status flags can be "
5831 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CREAT>, "
5832 "B<O_EXCL>, B<O_NOCTTY>, and B<O_TRUNC>.  The I<file status flags> are all of "
5833 "the remaining flags listed below.  The distinction between these two groups "
5834 "of flags is that the file status flags can be retrieved and (in some cases)  "
5835 "modified using B<fcntl>(2).  The full list of file creation flags and file "
5836 "status flags is as follows:"
5837 msgstr ""
5838 "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状"
5839 "態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指"
5840 "定することができる。 I<ファイル作成フラグ> は B<O_CREAT>, B<O_EXCL>, "
5841 "B<O_NOCTTY>, B<O_TRUNC> である。 I<ファイル状態フラグ> は以下のリストのうち上"
5842 "記以外の残りのものである。 二種類のフラグの違いは、ファイル状態フラグの方は "
5843 "B<fcntl>(2)  を使ってその内容を取得したり (場合によっては) 変更したりできる点"
5844 "にある。 ファイル作成フラグとファイル状態フラグの全リストを以下に示す:"
5845
5846 #. type: TP
5847 #: build/C/man2/open.2:142
5848 #, no-wrap
5849 msgid "B<O_APPEND>"
5850 msgstr "B<O_APPEND>"
5851
5852 #.  For more background, see
5853 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
5854 #.  http://nfs.sourceforge.net/
5855 #. type: Plain text
5856 #: build/C/man2/open.2:159
5857 msgid ""
5858 "The file is opened in append mode.  Before each B<write>(2), the file offset "
5859 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
5860 "may lead to corrupted files on NFS file systems if more than one process "
5861 "appends data to a file at once.  This is because NFS does not support "
5862 "appending to a file, so the client kernel has to simulate it, which can't be "
5863 "done without a race condition."
5864 msgstr ""
5865 "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に "
5866 "B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動す"
5867 "る。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひと"
5868 "つのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがあ"
5869 "る。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネ"
5870 "ル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けるこ"
5871 "とはできないからである。"
5872
5873 #. type: TP
5874 #: build/C/man2/open.2:159
5875 #, no-wrap
5876 msgid "B<O_ASYNC>"
5877 msgstr "B<O_ASYNC>"
5878
5879 #. type: Plain text
5880 #: build/C/man2/open.2:172
5881 msgid ""
5882 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
5883 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
5884 "this file descriptor.  This feature is only available for terminals, "
5885 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
5886 "B<fcntl>(2)  for further details."
5887 msgstr ""
5888 "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタ"
5889 "への 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは "
5890 "B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能"
5891 "なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと "
5892 "FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。"
5893
5894 #. type: TP
5895 #: build/C/man2/open.2:172
5896 #, no-wrap
5897 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
5898 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
5899
5900 #.  This flag fixes only one form of the race condition;
5901 #.  The race can also occur with, for example, descriptors
5902 #.  returned by accept(), pipe(), etc.
5903 #. type: Plain text
5904 #: build/C/man2/open.2:197
5905 msgid ""
5906 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
5907 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
5908 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
5909 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
5910 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
5911 "race conditions where one thread opens a file descriptor at the same time as "
5912 "another thread does a B<fork>(2)  plus B<execve>(2)."
5913 msgstr ""
5914 "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 この"
5915 "フラグを指定することで、プログラムは B<FD_CLOEXEC> フラグをセットするための "
5916 "B<fcntl>(2)  B<F_SETFD> 操作を別途呼び出す必要がなくなる。 また、ある種のマル"
5917 "チスレッドのプログラムはこのフラグの使用は 不可欠である。なぜなら、個別に "
5918 "B<FD_CLOEXEC> フラグを設定する B<fcntl>(2)  B<F_SETFD> 操作を呼び出したとして"
5919 "も、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッド"
5920 "が B<fork>(2)  と B<execve>(2)  を実行するという競合条件を避けるのには十分で"
5921 "はないからである。"
5922
5923 #. type: TP
5924 #: build/C/man2/open.2:197
5925 #, no-wrap
5926 msgid "B<O_CREAT>"
5927 msgstr "B<O_CREAT>"
5928
5929 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
5930 #.  XFS (since 2.6.14).
5931 #. type: Plain text
5932 #: build/C/man2/open.2:213
5933 msgid ""
5934 "If the file does not exist it will be created.  The owner (user ID) of the "
5935 "file is set to the effective user ID of the process.  The group ownership "
5936 "(group ID) is set either to the effective group ID of the process or to the "
5937 "group ID of the parent directory (depending on file system type and mount "
5938 "options, and the mode of the parent directory, see the mount options "
5939 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
5940 msgstr ""
5941 "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユー"
5942 "ザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グルー"
5943 "プ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定"
5944 "される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリの"
5945 "モードに依存する。 B<mount>(8)  で説明されているマウントオプション "
5946 "I<bsdgroups> と I<sysvgroups> を参照)。"
5947
5948 #. type: Plain text
5949 #: build/C/man2/open.2:236
5950 msgid ""
5951 "I<mode> specifies the permissions to use in case a new file is created.  "
5952 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
5953 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
5954 "permissions are modified by the process's I<umask> in the usual way: The "
5955 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
5956 "mode only applies to future accesses of the newly created file; the B<open>"
5957 "()  call that creates a read-only file may well return a read/write file "
5958 "descriptor."
5959 msgstr ""
5960 "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を"
5961 "指定する。 I<flags> に B<O_CREAT> が指定されている場合、 I<mode> を指定しなけ"
5962 "ればならない。 B<O_CREAT> が指定されていない場合、 I<mode> は無視される。 有"
5963 "効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作"
5964 "成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく"
5965 "作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意するこ"
5966 "と。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き"
5967 "可能なファイルディスクリプタを返すことがありうる。"
5968
5969 #. type: Plain text
5970 #: build/C/man2/open.2:239
5971 msgid "The following symbolic constants are provided for I<mode>:"
5972 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
5973
5974 #. type: TP
5975 #: build/C/man2/open.2:239
5976 #, no-wrap
5977 msgid "B<S_IRWXU>"
5978 msgstr "B<S_IRWXU>"
5979
5980 #. type: Plain text
5981 #: build/C/man2/open.2:242
5982 msgid "00700 user (file owner) has read, write and execute permission"
5983 msgstr ""
5984 "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
5985
5986 #. type: TP
5987 #: build/C/man2/open.2:242
5988 #, no-wrap
5989 msgid "B<S_IRUSR>"
5990 msgstr "B<S_IRUSR>"
5991
5992 #. type: Plain text
5993 #: build/C/man2/open.2:245
5994 msgid "00400 user has read permission"
5995 msgstr "00400 ユーザーに読み込みの許可がある。"
5996
5997 #. type: TP
5998 #: build/C/man2/open.2:245
5999 #, no-wrap
6000 msgid "B<S_IWUSR>"
6001 msgstr "B<S_IWUSR>"
6002
6003 #. type: Plain text
6004 #: build/C/man2/open.2:248
6005 msgid "00200 user has write permission"
6006 msgstr "00200 ユーザーに書き込みの許可がある。"
6007
6008 #. type: TP
6009 #: build/C/man2/open.2:248
6010 #, no-wrap
6011 msgid "B<S_IXUSR>"
6012 msgstr "B<S_IXUSR>"
6013
6014 #. type: Plain text
6015 #: build/C/man2/open.2:251
6016 msgid "00100 user has execute permission"
6017 msgstr "00100 ユーザーに実行の許可がある。"
6018
6019 #. type: TP
6020 #: build/C/man2/open.2:251
6021 #, no-wrap
6022 msgid "B<S_IRWXG>"
6023 msgstr "B<S_IRWXG>"
6024
6025 #. type: Plain text
6026 #: build/C/man2/open.2:254
6027 msgid "00070 group has read, write and execute permission"
6028 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
6029
6030 #. type: TP
6031 #: build/C/man2/open.2:254
6032 #, no-wrap
6033 msgid "B<S_IRGRP>"
6034 msgstr "B<S_IRGRP>"
6035
6036 #. type: Plain text
6037 #: build/C/man2/open.2:257
6038 msgid "00040 group has read permission"
6039 msgstr "00040 グループに読み込みの許可がある。"
6040
6041 #. type: TP
6042 #: build/C/man2/open.2:257
6043 #, no-wrap
6044 msgid "B<S_IWGRP>"
6045 msgstr "B<S_IWGRP>"
6046
6047 #. type: Plain text
6048 #: build/C/man2/open.2:260
6049 msgid "00020 group has write permission"
6050 msgstr "00020 グループに書き込みの許可がある。"
6051
6052 #. type: TP
6053 #: build/C/man2/open.2:260
6054 #, no-wrap
6055 msgid "B<S_IXGRP>"
6056 msgstr "B<S_IXGRP>"
6057
6058 #. type: Plain text
6059 #: build/C/man2/open.2:263
6060 msgid "00010 group has execute permission"
6061 msgstr "00010 グループに実行の許可がある。"
6062
6063 #. type: TP
6064 #: build/C/man2/open.2:263
6065 #, no-wrap
6066 msgid "B<S_IRWXO>"
6067 msgstr "B<S_IRWXO>"
6068
6069 #. type: Plain text
6070 #: build/C/man2/open.2:266
6071 msgid "00007 others have read, write and execute permission"
6072 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
6073
6074 #. type: TP
6075 #: build/C/man2/open.2:266
6076 #, no-wrap
6077 msgid "B<S_IROTH>"
6078 msgstr "B<S_IROTH>"
6079
6080 #. type: Plain text
6081 #: build/C/man2/open.2:269
6082 msgid "00004 others have read permission"
6083 msgstr "00004 他人に読み込みの許可がある。"
6084
6085 #. type: TP
6086 #: build/C/man2/open.2:269
6087 #, no-wrap
6088 msgid "B<S_IWOTH>"
6089 msgstr "B<S_IWOTH>"
6090
6091 #. type: Plain text
6092 #: build/C/man2/open.2:272
6093 msgid "00002 others have write permission"
6094 msgstr "00002 他人に書き込みの許可がある。"
6095
6096 #. type: TP
6097 #: build/C/man2/open.2:272
6098 #, no-wrap
6099 msgid "B<S_IXOTH>"
6100 msgstr "B<S_IXOTH>"
6101
6102 #. type: Plain text
6103 #: build/C/man2/open.2:275
6104 msgid "00001 others have execute permission"
6105 msgstr "00001 他人に実行の許可がある。"
6106
6107 #. type: TP
6108 #: build/C/man2/open.2:276
6109 #, no-wrap
6110 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
6111 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
6112
6113 #. type: Plain text
6114 #: build/C/man2/open.2:293
6115 msgid ""
6116 "Try to minimize cache effects of the I/O to and from this file.  In general "
6117 "this will degrade performance, but it is useful in special situations, such "
6118 "as when applications do their own caching.  File I/O is done directly to/"
6119 "from user space buffers.  The B<O_DIRECT> flag on its own makes an effort to "
6120 "transfer data synchronously, but does not give the guarantees of the "
6121 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
6122 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
6123 "B<O_DIRECT>.  See NOTES below for further discussion."
6124 msgstr ""
6125 "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグ"
6126 "を\n"
6127 "使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシング"
6128 "を\n"
6129 "行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッ"
6130 "ファ\n"
6131 "に対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようとは"
6132 "す\n"
6133 "るが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証されるわ"
6134 "け\n"
6135 "ではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を使"
6136 "用\n"
6137 "しなければならない。下記の「注意」の節の議論も参照。"
6138
6139 #. type: Plain text
6140 #: build/C/man2/open.2:297
6141 msgid ""
6142 "A semantically similar (but deprecated) interface for block devices is "
6143 "described in B<raw>(8)."
6144 msgstr ""
6145 "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明さ"
6146 "れている (但し、このインタフェースは非推奨である)。"
6147
6148 #. type: TP
6149 #: build/C/man2/open.2:297
6150 #, no-wrap
6151 msgid "B<O_DIRECTORY>"
6152 msgstr "B<O_DIRECTORY>"
6153
6154 #.  But see the following and its replies:
6155 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
6156 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
6157 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
6158 #. type: Plain text
6159 #: build/C/man2/open.2:311
6160 msgid ""
6161 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
6162 "Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-"
6163 "service problems if B<opendir>(3)  is called on a FIFO or tape device, but "
6164 "should not be used outside of the implementation of B<opendir>(3)."
6165 msgstr ""
6166 "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは Linux "
6167 "特有であり、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合"
6168 "の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追"
6169 "加された。 しかしこれは B<opendir>(3)  の実装以外では使用するべきではない。"
6170
6171 #. type: TP
6172 #: build/C/man2/open.2:311
6173 #, no-wrap
6174 msgid "B<O_EXCL>"
6175 msgstr "B<O_EXCL>"
6176
6177 #. type: Plain text
6178 #: build/C/man2/open.2:321
6179 msgid ""
6180 "Ensure that this call creates the file: if this flag is specified in "
6181 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
6182 "will fail."
6183 msgstr ""
6184 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> "
6185 "と\n"
6186 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失"
6187 "敗\n"
6188 "する。"
6189
6190 #.  POSIX.1-2001 explicitly requires this behavior.
6191 #. type: Plain text
6192 #: build/C/man2/open.2:329
6193 msgid ""
6194 "When these two flags are specified, symbolic links are not followed: if "
6195 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
6196 "the symbolic link points to."
6197 msgstr ""
6198 "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 "
6199 "I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指している"
6200 "かに関わらず B<open>()  は失敗する。"
6201
6202 #. type: Plain text
6203 #: build/C/man2/open.2:345
6204 msgid ""
6205 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
6206 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
6207 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
6208 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
6209 "the error B<EBUSY>."
6210 msgstr ""
6211 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
6212 "B<O_EXCL> の動作は規定されていない。\n"
6213 "これには一つ例外があり、Linux 2.6 以降では、\n"
6214 "I<pathname> がブロックデバイスを参照している場合、\n"
6215 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
6216 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
6217 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
6218
6219 #. type: Plain text
6220 #: build/C/man2/open.2:367
6221 msgid ""
6222 "On NFS, B<O_EXCL> is only supported when using NFSv3 or later on kernel 2.6 "
6223 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
6224 "programs that rely on it for performing locking tasks will contain a race "
6225 "condition.  Portable programs that want to perform atomic file locking using "
6226 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
6227 "create a unique file on the same file system (e.g., incorporating hostname "
6228 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>"
6229 "(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the "
6230 "unique file to check if its link count has increased to 2, in which case the "
6231 "lock is also successful."
6232 msgstr ""
6233 "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサ"
6234 "ポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグ"
6235 "に頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う "
6236 "可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現"
6237 "し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植"
6238 "性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えば"
6239 "ホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロッ"
6240 "クファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 な"
6241 "らばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリ"
6242 "ンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同"
6243 "じくロックに成功しているということである。"
6244
6245 #. type: TP
6246 #: build/C/man2/open.2:367
6247 #, no-wrap
6248 msgid "B<O_LARGEFILE>"
6249 msgstr "B<O_LARGEFILE>"
6250
6251 #. type: Plain text
6252 #: build/C/man2/open.2:389
6253 msgid ""
6254 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
6255 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
6256 "macro must be defined (before including I<any> header files)  in order to "
6257 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
6258 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
6259 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
6260 msgstr ""
6261 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)"
6262 "ファ\n"
6263 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファ"
6264 "イ\n"
6265 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなけれ"
6266 "ば\n"
6267 "ならない。\n"
6268 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
6269 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
6270 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
6271
6272 #. type: TP
6273 #: build/C/man2/open.2:389
6274 #, no-wrap
6275 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
6276 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
6277
6278 #.  The O_NOATIME flag also affects the treatment of st_atime
6279 #.  by mmap() and readdir(2), MTK, Dec 04.
6280 #. type: Plain text
6281 #: build/C/man2/open.2:400
6282 msgid ""
6283 "Do not update the file last access time (st_atime in the inode)  when the "
6284 "file is B<read>(2).  This flag is intended for use by indexing or backup "
6285 "programs, where its use can significantly reduce the amount of disk "
6286 "activity.  This flag may not be effective on all file systems.  One example "
6287 "is NFS, where the server maintains the access time."
6288 msgstr ""
6289 "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の "
6290 "st_atime) を更新しない。 このフラグはインデックス作成やバックアッププログラム"
6291 "で使うことを意図している。 これを使うとディスクに対する操作を大幅に減らすこと"
6292 "ができる。 このフラグは全てのファイルシステムに対して有効であるわけではな"
6293 "い。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
6294
6295 #. type: TP
6296 #: build/C/man2/open.2:400
6297 #, no-wrap
6298 msgid "B<O_NOCTTY>"
6299 msgstr "B<O_NOCTTY>"
6300
6301 #. type: Plain text
6302 #: build/C/man2/open.2:408
6303 msgid ""
6304 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(em it will "
6305 "not become the process's controlling terminal even if the process does not "
6306 "have one."
6307 msgstr ""
6308 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指してい"
6309 "る\n"
6310 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイ"
6311 "ル\n"
6312 "は制御端末にはならない。"
6313
6314 #. type: TP
6315 #: build/C/man2/open.2:408
6316 #, no-wrap
6317 msgid "B<O_NOFOLLOW>"
6318 msgstr "B<O_NOFOLLOW>"
6319
6320 #.  The headers from glibc 2.0.100 and later include a
6321 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
6322 #.  used\fP.
6323 #. type: Plain text
6324 #: build/C/man2/open.2:417
6325 msgid ""
6326 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
6327 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
6328 "earlier components of the pathname will still be followed."
6329 msgstr ""
6330 "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは "
6331 "FreeBSD の拡張で、Linux には 2.1.126 より追加された。 pathname の前のコンポー"
6332 "ネント (earlier component; 訳註: 最後のディレクトリセパレータより前の部分) "
6333 "が シンボリックリンクである場合には、それが指す先が参照される。"
6334
6335 #. type: TP
6336 #: build/C/man2/open.2:417
6337 #, no-wrap
6338 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
6339 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
6340
6341 #. type: Plain text
6342 #: build/C/man2/open.2:430
6343 msgid ""
6344 "When possible, the file is opened in nonblocking mode.  Neither the B<open>"
6345 "()  nor any subsequent operations on the file descriptor which is returned "
6346 "will cause the calling process to wait.  For the handling of FIFOs (named "
6347 "pipes), see also B<fifo>(7).  For a discussion of the effect of "
6348 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
6349 "see B<fcntl>(2)."
6350 msgstr ""
6351 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
6352 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び"
6353 "出\n"
6354 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
6355 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファ"
6356 "イ\n"
6357 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
6358 "議論は、 B<fcntl>(2) を参照すること。"
6359
6360 #. type: TP
6361 #: build/C/man2/open.2:430
6362 #, no-wrap
6363 msgid "B<O_SYNC>"
6364 msgstr "B<O_SYNC>"
6365
6366 #. type: Plain text
6367 #: build/C/man2/open.2:438
6368 msgid ""
6369 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
6370 "file descriptor will block the calling process until the data has been "
6371 "physically written to the underlying hardware.  I<But see NOTES below>."
6372 msgstr ""
6373 "ファイルは同期 (synchronous) I/O モードでオープンされる。 B<open>()  が返した"
6374 "ファイルディスクリプタに対して B<write>(2)  を行うと、必ず呼び出したプロセス"
6375 "をブロックし、 該当ハードウェアに物理的に書き込まれるまで返らない。 I<以下の"
6376 "「注意」の章も参照。>"
6377
6378 #. type: TP
6379 #: build/C/man2/open.2:438
6380 #, no-wrap
6381 msgid "B<O_TRUNC>"
6382 msgstr "B<O_TRUNC>"
6383
6384 #. type: Plain text
6385 #: build/C/man2/open.2:452
6386 msgid ""
6387 "If the file already exists and is a regular file and the open mode allows "
6388 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
6389 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
6390 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
6391 msgstr ""
6392 "ファイルが既に存在し、通常ファイルであり、 書き込み可モードでオープンされてい"
6393 "る (つまり、 B<O_RDWR>またはB<O_WRONLY> の) 場合、長さ 0 に切り詰め "
6394 "(truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 "
6395 "B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義で"
6396 "ある。"
6397
6398 #. type: Plain text
6399 #: build/C/man2/open.2:456
6400 msgid ""
6401 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
6402 "file has been opened."
6403 msgstr ""
6404 "これらの選択フラグのいくつかはファイルをオープンした後でも B<fcntl>(2)  を使"
6405 "用して変更することができる。"
6406
6407 #. type: Plain text
6408 #: build/C/man2/open.2:464
6409 msgid ""
6410 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|"
6411 "O_WRONLY|O_TRUNC>."
6412 msgstr ""
6413 "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  "
6414 "を行うのと等価である。"
6415
6416 #. type: Plain text
6417 #: build/C/man2/open.2:472
6418 msgid ""
6419 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
6420 "occurred (in which case, I<errno> is set appropriately)."
6421 msgstr ""
6422 "B<open>()  と B<creat>()  は新しいファイルディスクリプタを返す。 エラーが発生"
6423 "した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
6424
6425 #. type: Plain text
6426 #: build/C/man2/open.2:482
6427 msgid ""
6428 "The requested access to the file is not allowed, or search permission is "
6429 "denied for one of the directories in the path prefix of I<pathname>, or the "
6430 "file did not exist yet and write access to the parent directory is not "
6431 "allowed.  (See also B<path_resolution>(7).)"
6432 msgstr ""
6433 "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレク"
6434 "トリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せ"
6435 "ず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照"
6436 "すること。)"
6437
6438 #. type: Plain text
6439 #: build/C/man2/open.2:488
6440 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
6441 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
6442
6443 #. type: Plain text
6444 #: build/C/man2/open.2:492 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
6445 msgid "I<pathname> points outside your accessible address space."
6446 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
6447
6448 #. type: TP
6449 #: build/C/man2/open.2:492 build/C/man2/write.2:139
6450 #, no-wrap
6451 msgid "B<EFBIG>"
6452 msgstr "B<EFBIG>"
6453
6454 #. type: Plain text
6455 #: build/C/man2/open.2:496
6456 msgid "See B<EOVERFLOW>."
6457 msgstr "B<EOVERFLOW> 参照。"
6458
6459 #. type: TP
6460 #: build/C/man2/open.2:496 build/C/man2/read.2:104 build/C/man3/scanf.3:559
6461 #: build/C/man3/tmpfile.3:59 build/C/man2/write.2:144
6462 #, no-wrap
6463 msgid "B<EINTR>"
6464 msgstr "B<EINTR>"
6465
6466 #. type: Plain text
6467 #: build/C/man2/open.2:503
6468 msgid ""
6469 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
6470 "see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>"
6471 "(7)."
6472 msgstr ""
6473 "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って"
6474 "停止している間に システムコールがシグナルハンドラにより割り込まれた。 "
6475 "B<signal>(7)  参照。"
6476
6477 #. type: TP
6478 #: build/C/man2/open.2:503 build/C/man2/read.2:140 build/C/man2/rename.2:140
6479 #: build/C/man2/unlink.2:87
6480 #, no-wrap
6481 msgid "B<EISDIR>"
6482 msgstr "B<EISDIR>"
6483
6484 #. type: Plain text
6485 #: build/C/man2/open.2:512
6486 msgid ""
6487 "I<pathname> refers to a directory and the access requested involved writing "
6488 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
6489 msgstr ""
6490 "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり "
6491 "B<O_WRONLY> または B<O_RDWR> が設定されている)。"
6492
6493 #. type: Plain text
6494 #: build/C/man2/open.2:519
6495 msgid ""
6496 "Too many symbolic links were encountered in resolving I<pathname>, or "
6497 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
6498 msgstr ""
6499 "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。 または "
6500 "B<O_NOFOLLOW> が指定されており、 I<pathname> がシンボリックリンクだった。"
6501
6502 #. type: TP
6503 #: build/C/man2/open.2:519 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:62
6504 #, no-wrap
6505 msgid "B<EMFILE>"
6506 msgstr "B<EMFILE>"
6507
6508 #. type: Plain text
6509 #: build/C/man2/open.2:522
6510 msgid "The process already has the maximum number of files open."
6511 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している。"
6512
6513 #. type: Plain text
6514 #: build/C/man2/open.2:526 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
6515 msgid "I<pathname> was too long."
6516 msgstr "I<pathname> が長過ぎる。"
6517
6518 #. type: TP
6519 #: build/C/man2/open.2:526 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:65
6520 #, no-wrap
6521 msgid "B<ENFILE>"
6522 msgstr "B<ENFILE>"
6523
6524 #. type: Plain text
6525 #: build/C/man2/open.2:529 build/C/man2/pipe.2:113
6526 msgid "The system limit on the total number of open files has been reached."
6527 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
6528
6529 #. type: TP
6530 #: build/C/man2/open.2:529
6531 #, no-wrap
6532 msgid "B<ENODEV>"
6533 msgstr "B<ENODEV>"
6534
6535 #. type: Plain text
6536 #: build/C/man2/open.2:536
6537 msgid ""
6538 "I<pathname> refers to a device special file and no corresponding device "
6539 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
6540 "returned.)"
6541 msgstr ""
6542 "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存"
6543 "在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返され"
6544 "るべきである)"
6545
6546 #. type: Plain text
6547 #: build/C/man2/open.2:543
6548 msgid ""
6549 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
6550 "component in I<pathname> does not exist or is a dangling symbolic link."
6551 msgstr ""
6552 "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 "
6553 "I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリ"
6554 "ンクである。"
6555
6556 #. type: Plain text
6557 #: build/C/man2/open.2:552
6558 msgid ""
6559 "I<pathname> was to be created but the device containing I<pathname> has no "
6560 "room for the new file."
6561 msgstr ""
6562 "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しい"
6563 "ファイルのための空き容量がない。"
6564
6565 #. type: Plain text
6566 #: build/C/man2/open.2:559
6567 msgid ""
6568 "A component used as a directory in I<pathname> is not, in fact, a directory, "
6569 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
6570 msgstr ""
6571 "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 "
6572 "または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
6573
6574 #. type: Plain text
6575 #: build/C/man2/open.2:565
6576 msgid ""
6577 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
6578 "has the file open for reading.  Or, the file is a device special file and no "
6579 "corresponding device exists."
6580 msgstr ""
6581 "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で その"
6582 "ファイルを読み込みのためにオープンしているプロセスが存在しない。 または、ファ"
6583 "イルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
6584
6585 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
6586 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
6587 #.  Reported 2006-10-03
6588 #. type: Plain text
6589 #: build/C/man2/open.2:585
6590 msgid ""
6591 "I<pathname> refers to a regular file that is too large to be opened.  The "
6592 "usual scenario here is that an application compiled on a 32-bit platform "
6593 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<"
6594 "(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
6595 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
6596 "B<EFBIG> for this case."
6597 msgstr ""
6598 "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルであ"
6599 "る。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-"
6600 "D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイ"
6601 "ルサイズが I<(2E<lt>31)-1> ビットを超えるファイルを開こうとした場合である。 "
6602 "上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーであ"
6603 "る。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返して"
6604 "いた。"
6605
6606 #.  Strictly speaking, it's the file system UID... (MTK)
6607 #. type: Plain text
6608 #: build/C/man2/open.2:593
6609 msgid ""
6610 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
6611 "did not match the owner of the file and the caller was not privileged "
6612 "(B<CAP_FOWNER>)."
6613 msgstr ""
6614 "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの"
6615 "所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
6616
6617 #. type: Plain text
6618 #: build/C/man2/open.2:598
6619 msgid ""
6620 "I<pathname> refers to a file on a read-only file system and write access was "
6621 "requested."
6622 msgstr ""
6623 "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き"
6624 "込みアクセスが要求された。"
6625
6626 #. type: TP
6627 #: build/C/man2/open.2:598
6628 #, no-wrap
6629 msgid "B<ETXTBSY>"
6630 msgstr "B<ETXTBSY>"
6631
6632 #. type: Plain text
6633 #: build/C/man2/open.2:603
6634 msgid ""
6635 "I<pathname> refers to an executable image which is currently being executed "
6636 "and write access was requested."
6637 msgstr ""
6638 "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
6639
6640 #. type: TP
6641 #: build/C/man2/open.2:603
6642 #, no-wrap
6643 msgid "B<EWOULDBLOCK>"
6644 msgstr "B<EWOULDBLOCK>"
6645
6646 #. type: Plain text
6647 #: build/C/man2/open.2:610
6648 msgid ""
6649 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
6650 "the file (see B<fcntl>(2))."
6651 msgstr ""
6652 "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定され"
6653 "ていた (B<fcntl>(2)  参照)。"
6654
6655 #. type: Plain text
6656 #: build/C/man2/open.2:623
6657 msgid ""
6658 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
6659 "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
6660 "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
6661 "definitions."
6662 msgstr ""
6663 "SVr4, 4.3BSD, POSIX.1-2001.  フラグ B<O_DIRECTORY>, B<O_NOATIME>, "
6664 "B<O_NOFOLLOW> は Linux 特有のものであり、 これらのフラグの定義を得るために"
6665 "は、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を"
6666 "定義する必要があるかもしれない。"
6667
6668 #. type: Plain text
6669 #: build/C/man2/open.2:628
6670 msgid ""
6671 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
6672 "POSIX.1-2008."
6673 msgstr ""
6674 "B<O_CLOEXEC> フラグは POSIX.1-2001 では規定されていないが、 POSIX.1-2008 で規"
6675 "定されている。"
6676
6677 #. type: Plain text
6678 #: build/C/man2/open.2:636
6679 msgid ""
6680 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
6681 "(before including I<any> header files)  to get its definition."
6682 msgstr ""
6683 "B<O_DIRECT> は POSIX では規定されていない。 B<O_DIRECT> の定義を得るには "
6684 "(「どの」ヘッダファイルをインクルードするよりも前に)  B<_GNU_SOURCE> を定義し"
6685 "なければならない。"
6686
6687 #. type: Plain text
6688 #: build/C/man2/open.2:644
6689 msgid ""
6690 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
6691 "does not necessarily have the intention to read or write.  This is typically "
6692 "used to open devices in order to get a file descriptor for use with B<ioctl>"
6693 "(2)."
6694 msgstr ""
6695 "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write "
6696 "を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のための"
6697 "ファイルディスクリプタを取得するために、 デバイスをオープンするときによく用い"
6698 "られる。"
6699
6700 #.  See for example util-linux's disk-utils/setfdprm.c
6701 #.  For some background on access mode 3, see
6702 #.  http://thread.gmane.org/gmane.linux.kernel/653123
6703 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
6704 #.  LKML, 12 Mar 2008
6705 #. type: Plain text
6706 #: build/C/man2/open.2:673
6707 msgid ""
6708 "Unlike the other values that can be specified in I<flags>, the I<access "
6709 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
6710 "individual bits.  Rather, they define the low order two bits of I<flags>, "
6711 "and are defined respectively as 0, 1, and 2.  In other words, the "
6712 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
6713 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
6714 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
6715 "and write permission on the file and return a descriptor that can't be used "
6716 "for reading or writing.  This nonstandard access mode is used by some Linux "
6717 "drivers to return a descriptor that is only to be used for device-specific "
6718 "B<ioctl>(2)  operations."
6719 msgstr ""
6720 "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指"
6721 "定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は "
6722 "I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそ"
6723 "れぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組"
6724 "み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。 Linux "
6725 "では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されて"
6726 "おり I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出"
6727 "し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリ"
6728 "プタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで使用され"
6729 "ており、 デバイス固有の B<ioctl>(2)  操作にのみ使用されるディスクリプタを返す"
6730 "ために使われている。"
6731
6732 #.  Linux 2.0, 2.5: truncate
6733 #.  Solaris 5.7, 5.8: truncate
6734 #.  Irix 6.5: truncate
6735 #.  Tru64 5.1B: truncate
6736 #.  HP-UX 11.22: truncate
6737 #.  FreeBSD 4.7: truncate
6738 #. type: Plain text
6739 #: build/C/man2/open.2:684
6740 msgid ""
6741 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
6742 "implementations.  On many systems the file is actually truncated."
6743 msgstr ""
6744 "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多"
6745 "くのシステムではファイルは実際に切り詰められる。"
6746
6747 #. type: Plain text
6748 #: build/C/man2/open.2:688
6749 msgid ""
6750 "There are many infelicities in the protocol underlying NFS, affecting "
6751 "amongst others B<O_SYNC> and B<O_NDELAY>."
6752 msgstr ""
6753 "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と "
6754 "B<O_NDELAY> に影響する。"
6755
6756 #. type: Plain text
6757 #: build/C/man2/open.2:710
6758 msgid ""
6759 "POSIX provides for three different variants of synchronized I/O, "
6760 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
6761 "(2.6.31), Linux only implements B<O_SYNC>, but glibc maps B<O_DSYNC> and "
6762 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
6763 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
6764 "require all metadata updates of a write to be on disk on returning to "
6765 "userspace, but only the B<O_DSYNC> semantics, which require only actual file "
6766 "data and metadata necessary to retrieve it to be on disk by the time the "
6767 "system call returns."
6768 msgstr ""
6769 "POSIX では、3 種類の同期 I/O が提供されており、 B<O_SYNC>, B<O_DSYNC>, "
6770 "B<O_RSYNC> フラグがこれに対応するものである。 今のところ (カーネル 2.6.31)、 "
6771 "Linux では B<O_SYNC> だけが実装されているが、 glibc は B<O_DSYNC> と "
6772 "B<O_RSYNC> に B<O_SYNC> と同じ数値を割り当てている。 ほとんどの Linux のファ"
6773 "イルシステムは、実際には POSIX の B<O_SYNC> の動作ではなく B<O_DSYNC> の動作"
6774 "だけを実装している。 POSIX の B<O_SYNC> では、 B<open>()  がユーザ空間に返る"
6775 "際に、書き込みに関する全てのメタデータの 更新がディスクに書き込まれている必要"
6776 "がある。 一方、 B<O_DSYNC> では、 B<open>()  が返るまでに、実際のファイルの"
6777 "データとそのデータを取得するために 必要なメタデータだけがディスクに書き込まれ"
6778 "ていればよい。"
6779
6780 #. type: Plain text
6781 #: build/C/man2/open.2:718
6782 msgid ""
6783 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
6784 "create them; use B<mknod>(2)  instead."
6785 msgstr ""
6786 "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  で"
6787 "スペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使"
6788 "用する。"
6789
6790 #. type: Plain text
6791 #: build/C/man2/open.2:731
6792 msgid ""
6793 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
6794 "descriptor but, for example, B<read>(2)  requests are denied with "
6795 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
6796 "permissions, but UID mapping is performed by the server upon read and write "
6797 "requests."
6798 msgstr ""
6799 "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイル"
6800 "ディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合があ"
6801 "る。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行する"
6802 "が、読み込みや書き込みの際には サーバーで UID マッピングが行われるためであ"
6803 "る。"
6804
6805 #. type: Plain text
6806 #: build/C/man2/open.2:750
6807 msgid ""
6808 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
6809 "fields (respectively, time of last access, time of last status change, and "
6810 "time of last modification; see B<stat>(2))  are set to the current time, and "
6811 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
6812 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
6813 "st_ctime and st_mtime fields are set to the current time."
6814 msgstr ""
6815 "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, "
6816 "I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正"
6817 "時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリ"
6818 "の I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、"
6819 "O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と "
6820 "I<st_mtime> フィールドが現在時刻に設定される。"
6821
6822 #. type: SS
6823 #: build/C/man2/open.2:750
6824 #, no-wrap
6825 msgid "O_DIRECT"
6826 msgstr "O_DIRECT"
6827
6828 #. type: Plain text
6829 #: build/C/man2/open.2:767
6830 msgid ""
6831 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
6832 "address of userspace buffers and the file offset of I/Os.  In Linux "
6833 "alignment restrictions vary by file system and kernel version and might be "
6834 "absent entirely.  However there is currently no file system-independent "
6835 "interface for an application to discover these restrictions for a given file "
6836 "or file system.  Some file systems provide their own interfaces for doing "
6837 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
6838 msgstr ""
6839 "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O の"
6840 "ファイルオフセットに関してアラインメントの制限が課されることがある。 Linux で"
6841 "は、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異な"
6842 "り、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定された"
6843 "ファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプ"
6844 "リケーション向けのインタフェースで ファイルシステム非依存のものは存在しな"
6845 "い。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェース"
6846 "が 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
6847
6848 #. type: Plain text
6849 #: build/C/man2/open.2:773
6850 msgid ""
6851 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
6852 "the file offset must all be multiples of the logical block size of the file "
6853 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
6854 msgstr ""
6855 "Linux 2.4 では、転送サイズ、 ユーザーバッファのアラインメント、ファイルオフ"
6856 "セットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 "
6857 "Linux 2.6 では、512 バイトごとの境界に配置されていれば充分である。"
6858
6859 #. type: Plain text
6860 #: build/C/man2/open.2:783
6861 msgid ""
6862 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
6863 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
6864 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
6865 "flag of the same name, but without alignment restrictions."
6866 msgstr ""
6867 "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の "
6868 "(ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置と"
6869 "サイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフ"
6870 "ラグを導入したが、アラインメントの制限はない。"
6871
6872 #. type: Plain text
6873 #: build/C/man2/open.2:792
6874 msgid ""
6875 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
6876 "Linux kernels simply ignore this flag.  Some file systems may not implement "
6877 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
6878 msgstr ""
6879 "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 であ"
6880 "る。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサ"
6881 "ポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用する"
6882 "と B<open>()  は B<EINVAL> で失敗する。"
6883
6884 #. type: Plain text
6885 #: build/C/man2/open.2:803
6886 msgid ""
6887 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
6888 "file, and especially to overlapping byte regions in the same file.  Even "
6889 "when the file system correctly handles the coherency issues in this "
6890 "situation, overall I/O throughput is likely to be slower than using either "
6891 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
6892 "with direct I/O to the same files."
6893 msgstr ""
6894 "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対し"
6895 "て、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシス"
6896 "テムがこのような状況において一貫性の問題を正しく 扱うことができる場合であって"
6897 "も、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるで"
6898 "あろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 "
6899 "I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
6900
6901 #. type: Plain text
6902 #: build/C/man2/open.2:825
6903 msgid ""
6904 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
6905 "Older kernels, or kernels configured in certain ways, may not support this "
6906 "combination.  The NFS protocol does not support passing the flag to the "
6907 "server, so B<O_DIRECT> I/O will only bypass the page cache on the client; "
6908 "the server may still cache the I/O.  The client asks the server to make the "
6909 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
6910 "servers will perform poorly under these circumstances, especially if the I/O "
6911 "size is small.  Some servers may also be configured to lie to clients about "
6912 "the I/O having reached stable storage; this will avoid the performance "
6913 "penalty at some risk to data integrity in the event of server power "
6914 "failure.  The Linux NFS client places no alignment restrictions on "
6915 "B<O_DIRECT> I/O."
6916 msgstr ""
6917 "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違"
6918 "う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> "
6919 "と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体は"
6920 "サーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上"
6921 "のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしてい"
6922 "るかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サー"
6923 "バに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況"
6924 "下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによって"
6925 "は、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくも"
6926 "のもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない "
6927 "危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux "
6928 "の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
6929
6930 #. type: Plain text
6931 #: build/C/man2/open.2:832
6932 msgid ""
6933 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
6934 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
6935 "as a performance option which is disabled by default."
6936 msgstr ""
6937 "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能"
6938 "性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になって"
6939 "いる性能向上のためのオプションと 考えておくのがよいであろう。"
6940
6941 #. type: Plain text
6942 #: build/C/man2/open.2:837
6943 msgid ""
6944 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
6945 "interface is just stupid, and was probably designed by a deranged monkey on "
6946 "some serious mind-controlling substances.\"\\(emLinus"
6947 msgstr ""
6948 "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん"
6949 "危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないか"
6950 "な」 \\(em Linus"
6951
6952 #.  FIXME . Check bugzilla report on open(O_ASYNC)
6953 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
6954 #. type: Plain text
6955 #: build/C/man2/open.2:849
6956 msgid ""
6957 "Currently, it is not possible to enable signal-driven I/O by specifying "
6958 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
6959 msgstr ""
6960 "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/"
6961 "O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用"
6962 "すること。"
6963
6964 #. type: Plain text
6965 #: build/C/man2/open.2:871
6966 msgid ""
6967 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
6968 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
6969 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
6970 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
6971 msgstr ""
6972 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
6973 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
6974 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>"
6975 "(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
6976
6977 #. type: TH
6978 #: build/C/man3/perror.3:30
6979 #, no-wrap
6980 msgid "PERROR"
6981 msgstr "PERROR"
6982
6983 #. type: TH
6984 #: build/C/man3/perror.3:30
6985 #, no-wrap
6986 msgid "2012-04-17"
6987 msgstr "2012-04-17"
6988
6989 #. type: Plain text
6990 #: build/C/man3/perror.3:33
6991 msgid "perror - print a system error message"
6992 msgstr "perror - システムエラーメッセージを出力する"
6993
6994 #. type: Plain text
6995 #: build/C/man3/perror.3:37
6996 msgid "B<void perror(const char *>I<s>B<);>"
6997 msgstr "B<void perror(const char *>I<s>B<);>"
6998
6999 #. type: Plain text
7000 #: build/C/man3/perror.3:39
7001 msgid "B<#include E<lt>errno.hE<gt>>"
7002 msgstr "B<#include E<lt>errno.hE<gt>>"
7003
7004 #. type: Plain text
7005 #: build/C/man3/perror.3:41
7006 msgid "B<const char *>I<sys_errlist>B<[];>"
7007 msgstr "B<const char *>I<sys_errlist>B<[];>"
7008
7009 #. type: Plain text
7010 #: build/C/man3/perror.3:43
7011 msgid "B<int >I<sys_nerr>B<;>"
7012 msgstr "B<int >I<sys_nerr>B<;>"
7013
7014 #. type: Plain text
7015 #: build/C/man3/perror.3:45
7016 msgid "B<int >I<errno>B<;>"
7017 msgstr "B<int >I<errno>B<;>"
7018
7019 #. type: Plain text
7020 #: build/C/man3/perror.3:54
7021 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7022 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7023
7024 #. type: Plain text
7025 #: build/C/man3/perror.3:67
7026 msgid ""
7027 "The routine B<perror>()  produces a message on the standard error output, "
7028 "describing the last error encountered during a call to a system or library "
7029 "function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq"
7030 "\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a "
7031 "blank.  Then the message and a new-line."
7032 msgstr ""
7033 "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後"
7034 "に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 "
7035 "(I<s> が NULL でなく、 I<*s> が NULL バイト (\\(aq\\e0\\(aq) でない場合には) "
7036 "引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それから"
7037 "メッセージと改行が出力される。"
7038
7039 #. type: Plain text
7040 #: build/C/man3/perror.3:75
7041 msgid ""
7042 "To be of most use, the argument string should include the name of the "
7043 "function that incurred the error.  The error number is taken from the "
7044 "external variable I<errno>, which is set when errors occur but not cleared "
7045 "when successful calls are made."
7046 msgstr ""
7047 "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名"
7048 "を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> "
7049 "はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7050
7051 #. type: Plain text
7052 #: build/C/man3/perror.3:89
7053 msgid ""
7054 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
7055 "obtain the error message without the newline.  The largest message number "
7056 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
7057 "this list because new error values may not have been added to I<sys_errlist>"
7058 "[].  The use of I<sys_errlist>[] is nowadays deprecated."
7059 msgstr ""
7060 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、こ"
7061 "の\n"
7062 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセー"
7063 "ジ\n"
7064 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意するこ"
7065 "と。\n"
7066 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからであ"
7067 "る。\n"
7068 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7069
7070 #. type: Plain text
7071 #: build/C/man3/perror.3:111
7072 msgid ""
7073 "When a system call fails, it usually returns -1 and sets the variable "
7074 "I<errno> to a value describing what went wrong.  (These values can be found "
7075 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
7076 "B<perror>()  serves to translate this error code into human-readable form.  "
7077 "Note that I<errno> is undefined after a successful library call: this call "
7078 "may well change this variable, even though it succeeds, for example because "
7079 "it internally used some other library function that failed.  Thus, if a "
7080 "failing call is not immediately followed by a call to B<perror>(), the value "
7081 "of I<errno> should be saved."
7082 msgstr ""
7083 "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエ"
7084 "ラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に"
7085 "記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  "
7086 "は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラ"
7087 "リ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自"
7088 "身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果"
7089 "をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に "
7090 "B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならな"
7091 "い。"
7092
7093 #. type: Plain text
7094 #: build/C/man3/perror.3:124
7095 msgid ""
7096 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
7097 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
7098 "I<sys_errlist> conform to BSD."
7099 msgstr ""
7100 "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, "
7101 "POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD "
7102 "に準拠している。"
7103
7104 #.  and only when _BSD_SOURCE is defined.
7105 #.  When
7106 #.  .B _GNU_SOURCE
7107 #.  is defined, the symbols
7108 #.  .I _sys_nerr
7109 #.  and
7110 #.  .I _sys_errlist
7111 #.  are provided.
7112 #. type: Plain text
7113 #: build/C/man3/perror.3:139
7114 msgid ""
7115 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
7116 "I<E<lt>stdio.hE<gt>>."
7117 msgstr ""
7118 "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 "
7119 "I<E<lt>stdio.hE<gt>> に含まれている。"
7120
7121 #. type: Plain text
7122 #: build/C/man3/perror.3:144
7123 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7124 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7125
7126 #. type: TH
7127 #: build/C/man2/pipe.2:36
7128 #, no-wrap
7129 msgid "PIPE"
7130 msgstr "PIPE"
7131
7132 #. type: TH
7133 #: build/C/man2/pipe.2:36
7134 #, no-wrap
7135 msgid "2012-02-14"
7136 msgstr "2012-02-14"
7137
7138 #. type: Plain text
7139 #: build/C/man2/pipe.2:39
7140 msgid "pipe, pipe2 - create pipe"
7141 msgstr "pipe, pipe2 - パイプを生成する"
7142
7143 #. type: Plain text
7144 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
7145 #, no-wrap
7146 msgid "B<#include E<lt>unistd.hE<gt>>\n"
7147 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
7148
7149 #. type: Plain text
7150 #: build/C/man2/pipe.2:44
7151 #, no-wrap
7152 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7153 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7154
7155 #. type: Plain text
7156 #: build/C/man2/pipe.2:48
7157 #, no-wrap
7158 msgid ""
7159 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7160 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7161 "B<#include E<lt>unistd.hE<gt>>\n"
7162 msgstr ""
7163 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7164 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7165 "B<#include E<lt>unistd.hE<gt>>\n"
7166
7167 #. type: Plain text
7168 #: build/C/man2/pipe.2:50
7169 #, no-wrap
7170 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7171 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7172
7173 #. type: Plain text
7174 #: build/C/man2/pipe.2:66
7175 msgid ""
7176 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
7177 "for interprocess communication.  The array I<pipefd> is used to return two "
7178 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
7179 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
7180 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
7181 "until it is read from the read end of the pipe.  For further details, see "
7182 "B<pipe>(7)."
7183 msgstr ""
7184 "B<pipe>(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向の"
7185 "データチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイ"
7186 "ルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 "
7187 "I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれた"
7188 "データは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされ"
7189 "る。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7190
7191 #. type: Plain text
7192 #: build/C/man2/pipe.2:76
7193 msgid ""
7194 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
7195 "values can be bitwise ORed in I<flags> to obtain different behavior:"
7196 msgstr ""
7197 "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に"
7198 "以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることがで"
7199 "きる。"
7200
7201 #. type: TP
7202 #: build/C/man2/pipe.2:76
7203 #, no-wrap
7204 msgid "B<O_NONBLOCK>"
7205 msgstr "B<O_NONBLOCK>"
7206
7207 #. type: Plain text
7208 #: build/C/man2/pipe.2:84
7209 msgid ""
7210 "Set the B<O_NONBLOCK> file status flag on the two new open file "
7211 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
7212 "the same result."
7213 msgstr ""
7214 "新しく生成される二つのオープンファイル記述 (open file description) の "
7215 "B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うこと"
7216 "で、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなく"
7217 "なる。"
7218
7219 #. type: TP
7220 #: build/C/man2/pipe.2:84
7221 #, no-wrap
7222 msgid "B<O_CLOEXEC>"
7223 msgstr "B<O_CLOEXEC>"
7224
7225 #. type: Plain text
7226 #: build/C/man2/pipe.2:92
7227 msgid ""
7228 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
7229 "descriptors.  See the description of the same flag in B<open>(2)  for "
7230 "reasons why this may be useful."
7231 msgstr ""
7232 "新しく生成される二つのファイルディスクリプタの close-on-exec "
7233 "(B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 "
7234 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7235
7236 #. type: Plain text
7237 #: build/C/man2/pipe.2:102
7238 msgid "I<pipefd> is not valid."
7239 msgstr "I<pipefd> が無効な値である。"
7240
7241 #. type: Plain text
7242 #: build/C/man2/pipe.2:107
7243 msgid "(B<pipe2>())  Invalid value in I<flags>."
7244 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7245
7246 #. type: Plain text
7247 #: build/C/man2/pipe.2:110
7248 msgid "Too many file descriptors are in use by the process."
7249 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7250
7251 #. type: Plain text
7252 #: build/C/man2/pipe.2:118
7253 msgid ""
7254 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
7255 "starting with version 2.9."
7256 msgstr ""
7257 "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポート"
7258 "はバージョン 2.9 以降で利用できる。"
7259
7260 #. type: Plain text
7261 #: build/C/man2/pipe.2:121
7262 msgid "B<pipe>(): POSIX.1-2001."
7263 msgstr "B<pipe>(): POSIX.1-2001."
7264
7265 #. type: Plain text
7266 #: build/C/man2/pipe.2:124
7267 msgid "B<pipe2>()  is Linux-specific."
7268 msgstr "B<pipe2>()  は Linux 固有である。"
7269
7270 #.  fork.2 refers to this example program.
7271 #. type: Plain text
7272 #: build/C/man2/pipe.2:140
7273 msgid ""
7274 "The following program creates a pipe, and then B<fork>(2)s to create a child "
7275 "process; the child inherits a duplicate set of file descriptors that refer "
7276 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
7277 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
7278 "the string contained in the program's command-line argument to the pipe, and "
7279 "the child reads this string a byte at a time from the pipe and echoes it on "
7280 "standard output."
7281 msgstr ""
7282 "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成す"
7283 "る。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継"
7284 "承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がな"
7285 "くなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン"
7286 "引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプか"
7287 "ら 1 バイトずつ読み込んで標準出力にエコーする。"
7288
7289 #. type: Plain text
7290 #: build/C/man2/pipe.2:147
7291 #, no-wrap
7292 msgid ""
7293 "#include E<lt>sys/wait.hE<gt>\n"
7294 "#include E<lt>stdio.hE<gt>\n"
7295 "#include E<lt>stdlib.hE<gt>\n"
7296 "#include E<lt>unistd.hE<gt>\n"
7297 "#include E<lt>string.hE<gt>\n"
7298 msgstr ""
7299 "#include E<lt>sys/wait.hE<gt>\n"
7300 "#include E<lt>stdio.hE<gt>\n"
7301 "#include E<lt>stdlib.hE<gt>\n"
7302 "#include E<lt>unistd.hE<gt>\n"
7303 "#include E<lt>string.hE<gt>\n"
7304
7305 #. type: Plain text
7306 #: build/C/man2/pipe.2:154
7307 #, no-wrap
7308 msgid ""
7309 "int\n"
7310 "main(int argc, char *argv[])\n"
7311 "{\n"
7312 "    int pipefd[2];\n"
7313 "    pid_t cpid;\n"
7314 "    char buf;\n"
7315 msgstr ""
7316 "int\n"
7317 "main(int argc, char *argv[])\n"
7318 "{\n"
7319 "    int pipefd[2];\n"
7320 "    pid_t cpid;\n"
7321 "    char buf;\n"
7322
7323 #. type: Plain text
7324 #: build/C/man2/pipe.2:159
7325 #, no-wrap
7326 msgid ""
7327 "    if (argc != 2) {\n"
7328 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7329 "\texit(EXIT_FAILURE);\n"
7330 "    }\n"
7331 msgstr ""
7332 "    if (argc != 2) {\n"
7333 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7334 "\texit(EXIT_FAILURE);\n"
7335 "    }\n"
7336
7337 #. type: Plain text
7338 #: build/C/man2/pipe.2:164
7339 #, no-wrap
7340 msgid ""
7341 "    if (pipe(pipefd) == -1) {\n"
7342 "        perror(\"pipe\");\n"
7343 "        exit(EXIT_FAILURE);\n"
7344 "    }\n"
7345 msgstr ""
7346 "    if (pipe(pipefd) == -1) {\n"
7347 "        perror(\"pipe\");\n"
7348 "        exit(EXIT_FAILURE);\n"
7349 "    }\n"
7350
7351 #. type: Plain text
7352 #: build/C/man2/pipe.2:170
7353 #, no-wrap
7354 msgid ""
7355 "    cpid = fork();\n"
7356 "    if (cpid == -1) {\n"
7357 "        perror(\"fork\");\n"
7358 "        exit(EXIT_FAILURE);\n"
7359 "    }\n"
7360 msgstr ""
7361 "    cpid = fork();\n"
7362 "    if (cpid == -1) {\n"
7363 "        perror(\"fork\");\n"
7364 "        exit(EXIT_FAILURE);\n"
7365 "    }\n"
7366
7367 #. type: Plain text
7368 #: build/C/man2/pipe.2:173
7369 #, no-wrap
7370 msgid ""
7371 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7372 "        close(pipefd[1]);          /* Close unused write end */\n"
7373 msgstr ""
7374 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7375 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7376
7377 #. type: Plain text
7378 #: build/C/man2/pipe.2:176
7379 #, no-wrap
7380 msgid ""
7381 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7382 "            write(STDOUT_FILENO, &buf, 1);\n"
7383 msgstr ""
7384 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7385 "            write(STDOUT_FILENO, &buf, 1);\n"
7386
7387 #. type: Plain text
7388 #: build/C/man2/pipe.2:180
7389 #, no-wrap
7390 msgid ""
7391 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7392 "        close(pipefd[0]);\n"
7393 "        _exit(EXIT_SUCCESS);\n"
7394 msgstr ""
7395 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7396 "        close(pipefd[0]);\n"
7397 "        _exit(EXIT_SUCCESS);\n"
7398
7399 #. type: Plain text
7400 #: build/C/man2/pipe.2:189
7401 #, no-wrap
7402 msgid ""
7403 "    } else {            /* Parent writes argv[1] to pipe */\n"
7404 "        close(pipefd[0]);          /* Close unused read end */\n"
7405 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7406 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7407 "        wait(NULL);                /* Wait for child */\n"
7408 "        exit(EXIT_SUCCESS);\n"
7409 "    }\n"
7410 "}\n"
7411 msgstr ""
7412 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7413 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7414 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7415 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7416 "        wait(NULL);                /* 子プロセスを待つ */\n"
7417 "        exit(EXIT_SUCCESS);\n"
7418 "    }\n"
7419 "}\n"
7420
7421 #. type: Plain text
7422 #: build/C/man2/pipe.2:197
7423 msgid ""
7424 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7425 "(7)"
7426 msgstr ""
7427 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>"
7428 "(7)"
7429
7430 #. type: TH
7431 #: build/C/man3/popen.3:38
7432 #, no-wrap
7433 msgid "POPEN"
7434 msgstr "POPEN"
7435
7436 #. type: TH
7437 #: build/C/man3/popen.3:38
7438 #, no-wrap
7439 msgid "2010-02-03"
7440 msgstr "2010-02-03"
7441
7442 #. type: Plain text
7443 #: build/C/man3/popen.3:41
7444 msgid "popen, pclose - pipe stream to or from a process"
7445 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7446
7447 #. type: Plain text
7448 #: build/C/man3/popen.3:46
7449 #, no-wrap
7450 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7451 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7452
7453 #. type: Plain text
7454 #: build/C/man3/popen.3:48
7455 #, no-wrap
7456 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7457 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7458
7459 #. type: Plain text
7460 #: build/C/man3/popen.3:58
7461 msgid "B<popen>(), B<pclose>():"
7462 msgstr "B<popen>(), B<pclose>():"
7463
7464 #. type: Plain text
7465 #: build/C/man3/popen.3:60
7466 msgid ""
7467 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7468 msgstr ""
7469 "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7470
7471 #. type: Plain text
7472 #: build/C/man3/popen.3:71
7473 msgid ""
7474 "The B<popen>()  function opens a process by creating a pipe, forking, and "
7475 "invoking the shell.  Since a pipe is by definition unidirectional, the "
7476 "I<type> argument may specify only reading or writing, not both; the "
7477 "resulting stream is correspondingly read-only or write-only."
7478 msgstr ""
7479 "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、"
7480 "フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なの"
7481 "で、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方"
7482 "は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用ま"
7483 "たは 書き込み専用のいずれかとなる。"
7484
7485 #. type: Plain text
7486 #: build/C/man3/popen.3:95
7487 msgid ""
7488 "The I<command> argument is a pointer to a null-terminated string containing "
7489 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
7490 "flag; interpretation, if any, is performed by the shell.  The I<type> "
7491 "argument is a pointer to a null-terminated string which must contain either "
7492 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
7493 "Since glibc 2.9, this argument can additionally include the letter \\(aqe"
7494 "\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the "
7495 "underlying file descriptor; see the description of the B<O_CLOEXEC> flag in "
7496 "B<open>(2)  for reasons why this may be useful."
7497 msgstr ""
7498 "I<command> 引き数は、シェルのコマンドラインを含む NULL 終端された文字列へのポ"
7499 "インタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コ"
7500 "マンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、"
7501 "NULL 終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き"
7502 "込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc "
7503 "2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe"
7504 "\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec "
7505 "フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 "
7506 "B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7507
7508 #. type: Plain text
7509 #: build/C/man3/popen.3:111
7510 msgid ""
7511 "The return value from B<popen>()  is a normal standard I/O stream in all "
7512 "respects save that it must be closed with B<pclose>()  rather than B<fclose>"
7513 "(3).  Writing to such a stream writes to the standard input of the command; "
7514 "the command's standard output is the same as that of the process that called "
7515 "B<popen>(), unless this is altered by the command itself.  Conversely, "
7516 "reading from a \"popened\" stream reads the command's standard output, and "
7517 "the command's standard input is the same as that of the process that called "
7518 "B<popen>()."
7519 msgstr ""
7520 "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 "
7521 "B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 "
7522 "このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コ"
7523 "マンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>"
7524 "()  を呼んだプロセスの標準出力と同じことになる。 逆に、\"popened\" (B<popen>"
7525 "()  によって開かれた) ストリームからの読み込みは、 そのコマンドの標準出力を読"
7526 "み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロ"
7527 "セスの標準入力と同一である。"
7528
7529 #. type: Plain text
7530 #: build/C/man3/popen.3:115
7531 msgid "Note that output B<popen>()  streams are fully buffered by default."
7532 msgstr ""
7533 "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされること"
7534 "に注意しよう。"
7535
7536 #. type: Plain text
7537 #: build/C/man3/popen.3:121
7538 msgid ""
7539 "The B<pclose>()  function waits for the associated process to terminate and "
7540 "returns the exit status of the command as returned by B<wait4>(2)."
7541 msgstr ""
7542 "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 "
7543 "B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7544
7545 #. type: Plain text
7546 #: build/C/man3/popen.3:129
7547 msgid ""
7548 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
7549 "calls fail, or if it cannot allocate memory."
7550 msgstr ""
7551 "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合"
7552 "や、 メモリ割り当てができなかった場合、 NULL を返す。"
7553
7554 #.  These conditions actually give undefined results, so I commented
7555 #.  them out.
7556 #.  .I stream
7557 #.  is not associated with a "popen()ed" command, if
7558 #. .I stream
7559 #.  already "pclose()d", or if
7560 #. type: Plain text
7561 #: build/C/man3/popen.3:141
7562 msgid ""
7563 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
7564 "some other error is detected."
7565 msgstr ""
7566 "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つ"
7567 "かった場合、 -1 を返す。"
7568
7569 #. type: Plain text
7570 #: build/C/man3/popen.3:160
7571 msgid ""
7572 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
7573 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
7574 "appropriately.  If the I<type> argument is invalid, and this condition is "
7575 "detected, I<errno> is set to B<EINVAL>."
7576 msgstr ""
7577 "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしな"
7578 "い。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合に"
7579 "は、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が"
7580 "検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7581
7582 #. type: Plain text
7583 #: build/C/man3/popen.3:167
7584 msgid ""
7585 "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7586 msgstr ""
7587 "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が "
7588 "B<ECHILD> にセットされる。"
7589
7590 #. type: Plain text
7591 #: build/C/man3/popen.3:173
7592 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7593 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7594
7595 #. type: Plain text
7596 #: build/C/man3/popen.3:186
7597 msgid ""
7598 "Since the standard input of a command opened for reading shares its seek "
7599 "offset with the process that called B<popen>(), if the original process has "
7600 "done a buffered read, the command's input position may not be as expected.  "
7601 "Similarly, the output from a command opened for writing may become "
7602 "intermingled with that of the original process.  The latter can be avoided "
7603 "by calling B<fflush>(3)  before B<popen>()."
7604 msgstr ""
7605 "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一"
7606 "緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングさ"
7607 "れた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なって"
7608 "いないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 "
7609 "もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  "
7610 "の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7611
7612 #.  .SH HISTORY
7613 #.  A
7614 #.  .BR popen ()
7615 #.  and a
7616 #.  .BR pclose ()
7617 #.  function appeared in Version 7 AT&T UNIX.
7618 #. type: Plain text
7619 #: build/C/man3/popen.3:196
7620 msgid ""
7621 "Failure to execute the shell is indistinguishable from the shell's failure "
7622 "to execute command, or an immediate exit of the command.  The only hint is "
7623 "an exit status of 127."
7624 msgstr ""
7625 "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがす"
7626 "ぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 に"
7627 "なることである。"
7628
7629 #. type: Plain text
7630 #: build/C/man3/popen.3:206
7631 msgid ""
7632 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7633 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7634 msgstr ""
7635 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
7636 "B<fopen>(3), B<stdio>(3), B<system>(3)"
7637
7638 #. type: TH
7639 #: build/C/man3/printf.3:34
7640 #, no-wrap
7641 msgid "PRINTF"
7642 msgstr "PRINTF"
7643
7644 #. type: TH
7645 #: build/C/man3/printf.3:34 build/C/man3/puts.3:24 build/C/man3/scanf.3:50
7646 #, no-wrap
7647 msgid "2011-09-28"
7648 msgstr "2011-09-28"
7649
7650 #. type: Plain text
7651 #: build/C/man3/printf.3:38
7652 msgid ""
7653 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7654 "formatted output conversion"
7655 msgstr ""
7656 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
7657 "指定された書式に変換して出力を行う"
7658
7659 #. type: Plain text
7660 #: build/C/man3/printf.3:42
7661 msgid "B<int printf(const char *>I<format>B<, ...);>"
7662 msgstr "B<int printf(const char *>I<format>B<, ...);>"
7663
7664 #. type: Plain text
7665 #: build/C/man3/printf.3:44
7666 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7667 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7668
7669 #. type: Plain text
7670 #: build/C/man3/printf.3:46
7671 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7672 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7673
7674 #. type: Plain text
7675 #: build/C/man3/printf.3:48
7676 msgid ""
7677 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7678 "*>I<format>B<, ...);>"
7679 msgstr ""
7680 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7681 "*>I<format>B<, ...);>"
7682
7683 #. type: Plain text
7684 #: build/C/man3/printf.3:50
7685 msgid "B<#include E<lt>stdarg.hE<gt>>"
7686 msgstr "B<#include E<lt>stdarg.hE<gt>>"
7687
7688 #. type: Plain text
7689 #: build/C/man3/printf.3:52
7690 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7691 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7692
7693 #. type: Plain text
7694 #: build/C/man3/printf.3:54
7695 msgid ""
7696 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7697 ">I<ap>B<);>"
7698 msgstr ""
7699 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
7700 ">I<ap>B<);>"
7701
7702 #. type: Plain text
7703 #: build/C/man3/printf.3:56
7704 msgid ""
7705 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7706 msgstr ""
7707 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7708
7709 #. type: Plain text
7710 #: build/C/man3/printf.3:59
7711 msgid ""
7712 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7713 "*>I<format>B<, va_list >I<ap>B<);>"
7714 msgstr ""
7715 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
7716 "*>I<format>B<, va_list >I<ap>B<);>"
7717
7718 #. type: Plain text
7719 #: build/C/man3/printf.3:68
7720 msgid "B<snprintf>(), B<vsnprintf>():"
7721 msgstr "B<snprintf>(), B<vsnprintf>():"
7722
7723 #. type: Plain text
7724 #: build/C/man3/printf.3:71
7725 msgid ""
7726 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7727 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7728 msgstr ""
7729 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
7730 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7731
7732 #. type: Plain text
7733 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:83
7734 msgid "or I<cc -std=c99>"
7735 msgstr "or I<cc -std=c99>"
7736
7737 #. type: Plain text
7738 #: build/C/man3/printf.3:101
7739 msgid ""
7740 "The functions in the B<printf>()  family produce output according to a "
7741 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
7742 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
7743 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
7744 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
7745 "string I<str>."
7746 msgstr ""
7747 "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生"
7748 "成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力"
7749 "ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出"
7750 "力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
7751 "B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
7752
7753 #. type: Plain text
7754 #: build/C/man3/printf.3:110
7755 msgid ""
7756 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
7757 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
7758 msgstr ""
7759 "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込"
7760 "む (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) もを含まれる)。"
7761
7762 #. type: Plain text
7763 #: build/C/man3/printf.3:134
7764 msgid ""
7765 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
7766 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
7767 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
7768 "instead of a variable number of arguments.  These functions do not call the "
7769 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
7770 "I<ap> is undefined after the call.  See B<stdarg>(3)."
7771 msgstr ""
7772 "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞ"
7773 "れ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であ"
7774 "り、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異な"
7775 "る。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は "
7776 "I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>"
7777 "(3)  を参照のこと。"
7778
7779 #. type: Plain text
7780 #: build/C/man3/printf.3:141
7781 msgid ""
7782 "These eight functions write the output under the control of a I<format> "
7783 "string that specifies how subsequent arguments (or arguments accessed via "
7784 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
7785 "output."
7786 msgstr ""
7787 "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 "
7788 "I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構"
7789 "を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
7790
7791 #. type: Plain text
7792 #: build/C/man3/printf.3:152
7793 msgid ""
7794 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
7795 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
7796 "copying to take place between objects that overlap (e.g., if the target "
7797 "string array and one of the supplied input arguments refer to the same "
7798 "buffer).  See NOTES."
7799 msgstr ""
7800 "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
7801 "B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する"
7802 "場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された "
7803 "引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参"
7804 "照。"
7805
7806 #. type: SS
7807 #: build/C/man3/printf.3:152
7808 #, no-wrap
7809 msgid "Return value"
7810 msgstr "Return Values"
7811
7812 #. type: Plain text
7813 #: build/C/man3/printf.3:155
7814 msgid ""
7815 "Upon successful return, these functions return the number of characters "
7816 "printed (excluding the null byte used to end output to strings)."
7817 msgstr ""
7818 "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使"
7819 "用する NULL バイトは数に含まれない)。"
7820
7821 #. type: Plain text
7822 #: build/C/man3/printf.3:171
7823 msgid ""
7824 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
7825 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
7826 "the output was truncated due to this limit then the return value is the "
7827 "number of characters (excluding the terminating null byte)  which would have "
7828 "been written to the final string if enough space had been available.  Thus, "
7829 "a return value of I<size> or more means that the output was truncated.  (See "
7830 "also below under NOTES.)"
7831 msgstr ""
7832 "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込ま"
7833 "ない (I<size> には文字列を終端する NULL バイト (\\(aq\\e0\\(aq) も含まれ"
7834 "る)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれ"
7835 "ば書き込まれたであろう文字の個数 (文字列を終端する NULL バイトを除く) を返"
7836 "す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味"
7837 "する (後述の注意も参照のこと)。"
7838
7839 #. type: Plain text
7840 #: build/C/man3/printf.3:173
7841 msgid "If an output error is encountered, a negative value is returned."
7842 msgstr "エラーが発生した場合は、負の数を返す。"
7843
7844 #. type: SS
7845 #: build/C/man3/printf.3:173
7846 #, no-wrap
7847 msgid "Format of the format string"
7848 msgstr "フォーマット文字列のフォーマット"
7849
7850 #. type: Plain text
7851 #: build/C/man3/printf.3:195
7852 msgid ""
7853 "The format string is a character string, beginning and ending in its initial "
7854 "shift state, if any.  The format string is composed of zero or more "
7855 "directives: ordinary characters (not B<%>), which are copied unchanged to "
7856 "the output stream; and conversion specifications, each of which results in "
7857 "fetching zero or more subsequent arguments.  Each conversion specification "
7858 "is introduced by the character B<%>, and ends with a I<conversion "
7859 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
7860 "an optional minimum I<field width>, an optional I<precision> and an optional "
7861 "I<length modifier>."
7862 msgstr ""
7863 "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期"
7864 "シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) に"
7865 "よって構成される。 命令には、通常文字と変換指定 (conversion specifications) "
7866 "がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされ"
7867 "る。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で"
7868 "始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の"
7869 "間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾"
7870 "子> を (この順序で) 置くことができる。"
7871
7872 #. type: Plain text
7873 #: build/C/man3/printf.3:208
7874 msgid ""
7875 "The arguments must correspond properly (after type promotion) with the "
7876 "conversion specifier.  By default, the arguments are used in the order "
7877 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
7878 "next argument (and it is an error if insufficiently many arguments are "
7879 "given).  One can also specify explicitly which argument is taken, at each "
7880 "place where an argument is required, by writing \"%m$\" instead of \\(aq%"
7881 "\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
7882 "denotes the position in the argument list of the desired argument, indexed "
7883 "starting from 1.  Thus,"
7884 msgstr ""
7885 "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならな"
7886 "い。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求さ"
7887 "れ、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分な"
7888 "らエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$"
7889 "\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用す"
7890 "るかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リスト"
7891 "での位置を示す (最初の引き数の番号が 1 である)。 従って、"
7892
7893 #. type: Plain text
7894 #: build/C/man3/printf.3:212
7895 #, no-wrap
7896 msgid "printf(\"%*d\", width, num);\n"
7897 msgstr "printf(\"%*d\", width, num);\n"
7898
7899 #. type: Plain text
7900 #: build/C/man3/printf.3:216
7901 msgid "and"
7902 msgstr "と"
7903
7904 #. type: Plain text
7905 #: build/C/man3/printf.3:220
7906 #, no-wrap
7907 msgid "printf(\"%2$*1$d\", width, num);\n"
7908 msgstr "printf(\"%2$*1$d\", width, num);\n"
7909
7910 #. type: Plain text
7911 #: build/C/man3/printf.3:236
7912 msgid ""
7913 "are equivalent.  The second style allows repeated references to the same "
7914 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
7915 "which comes from the Single UNIX Specification.  If the style using \\(aq$"
7916 "\\(aq is used, it must be used throughout for all conversions taking an "
7917 "argument and all width and precision arguments, but it may be mixed with \"%%"
7918 "\" formats which do not consume an argument.  There may be no gaps in the "
7919 "numbers of arguments specified using \\(aq$\\(aq; for example, if arguments "
7920 "1 and 3 are specified, argument 2 must also be specified somewhere in the "
7921 "format string."
7922 msgstr ""
7923 "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 "
7924 "C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は"
7925 "含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅"
7926 "と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費し"
7927 "ない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される"
7928 "引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定される"
7929 "と、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
7930
7931 #. type: Plain text
7932 #: build/C/man3/printf.3:246
7933 msgid ""
7934 "For some numeric conversions a radix character (\"decimal point\") or "
7935 "thousands' grouping character is used.  The actual character used depends on "
7936 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
7937 "radix character, and does not have a grouping character.  Thus,"
7938 msgstr ""
7939 "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を"
7940 "使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq."
7941 "\\(aq を用い、 区切り文字は使わない。 従って、"
7942
7943 #. type: Plain text
7944 #: build/C/man3/printf.3:250
7945 #, no-wrap
7946 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
7947 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
7948
7949 #. type: Plain text
7950 #: build/C/man3/printf.3:255
7951 msgid ""
7952 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
7953 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
7954 msgstr ""
7955 "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは "
7956 "\"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
7957
7958 #. type: SS
7959 #: build/C/man3/printf.3:255
7960 #, no-wrap
7961 msgid "The flag characters"
7962 msgstr "フラグ文字"
7963
7964 #. type: Plain text
7965 #: build/C/man3/printf.3:257
7966 msgid "The character % is followed by zero or more of the following flags:"
7967 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
7968
7969 #. type: TP
7970 #: build/C/man3/printf.3:257
7971 #, no-wrap
7972 msgid "B<#>"
7973 msgstr "B<#>"
7974
7975 #. type: Plain text
7976 #: build/C/man3/printf.3:291
7977 msgid ""
7978 "The value should be converted to an \"alternate form\".  For B<o> "
7979 "conversions, the first character of the output string is made zero (by "
7980 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
7981 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
7982 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
7983 "conversions, the result will always contain a decimal point, even if no "
7984 "digits follow it (normally, a decimal point appears in the results of those "
7985 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
7986 "trailing zeros are not removed from the result as they would otherwise be.  "
7987 "For other conversions, the result is undefined."
7988 msgstr ""
7989 "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない"
7990 "場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> "
7991 "と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合に"
7992 "は \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> "
7993 "変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常"
7994 "は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変"
7995 "換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の"
7996 "変換では、結果は未定義である。"
7997
7998 #. type: TP
7999 #: build/C/man3/printf.3:291
8000 #, no-wrap
8001 msgid "B<\\&0>"
8002 msgstr "B<\\&0>"
8003
8004 #. type: Plain text
8005 #: build/C/man3/printf.3:331
8006 msgid ""
8007 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
8008 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
8009 "converted value is padded on the left with zeros rather than blanks.  If the "
8010 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
8011 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
8012 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
8013 "is undefined."
8014 msgstr ""
8015 "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, "
8016 "B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼ"
8017 "ロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無"
8018 "視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定"
8019 "された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義"
8020 "である。"
8021
8022 #. type: TP
8023 #: build/C/man3/printf.3:331
8024 #, no-wrap
8025 msgid "B<->"
8026 msgstr "B<->"
8027
8028 #. type: Plain text
8029 #: build/C/man3/printf.3:344
8030 msgid ""
8031 "The converted value is to be left adjusted on the field boundary.  (The "
8032 "default is right justification.)  Except for B<n> conversions, the converted "
8033 "value is padded on the right with blanks, rather than on the left with "
8034 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
8035 msgstr ""
8036 "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 B<n> 変換以"
8037 "外では、変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> "
8038 "と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
8039
8040 #. type: TP
8041 #: build/C/man3/printf.3:344
8042 #, no-wrap
8043 msgid "B<\\(aq \\(aq>"
8044 msgstr "B<' '>"
8045
8046 #. type: Plain text
8047 #: build/C/man3/printf.3:348
8048 msgid ""
8049 "(a space) A blank should be left before a positive number (or empty string) "
8050 "produced by a signed conversion."
8051 msgstr ""
8052 "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字"
8053 "列) が置かれる。"
8054
8055 #. type: TP
8056 #: build/C/man3/printf.3:348
8057 #, no-wrap
8058 msgid "B<+>"
8059 msgstr "B<+>"
8060
8061 #. type: Plain text
8062 #: build/C/man3/printf.3:356
8063 msgid ""
8064 "A sign (+ or -) should always be placed before a number produced by a signed "
8065 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
8066 "overrides a space if both are used."
8067 msgstr ""
8068 "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デ"
8069 "フォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方"
8070 "が使われている場合には、 B<+> が優先される。"
8071
8072 #. type: Plain text
8073 #: build/C/man3/printf.3:359
8074 msgid ""
8075 "The five flag characters above are defined in the C standard.  The SUSv2 "
8076 "specifies one further flag character."
8077 msgstr ""
8078 "上記の 5 つのフラグは C 標準で定義されている。 SUSv2 では、さらにもう一つフラ"
8079 "グ文字が規定されている。"
8080
8081 #. type: TP
8082 #: build/C/man3/printf.3:359
8083 #, no-wrap
8084 msgid "B<\\(aq>"
8085 msgstr "B<\\(aq>"
8086
8087 #. type: Plain text
8088 #: build/C/man3/printf.3:376
8089 msgid ""
8090 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
8091 "output is to be grouped with thousands' grouping characters if the locale "
8092 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
8093 "parse this option and will issue a warning.  SUSv2 does not include I<%"
8094 "\\(aqF>."
8095 msgstr ""
8096 "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報"
8097 "に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョ"
8098 "ンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 %"
8099 "\\(aqF は SUSv2 には含まれていない。"
8100
8101 #. type: Plain text
8102 #: build/C/man3/printf.3:378
8103 msgid "glibc 2.2 adds one further flag character."
8104 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
8105
8106 #. type: TP
8107 #: build/C/man3/printf.3:378
8108 #, no-wrap
8109 msgid "B<I>"
8110 msgstr "B<I>"
8111
8112 #.  outdigits keyword in locale file
8113 #. type: Plain text
8114 #: build/C/man3/printf.3:388
8115 msgid ""
8116 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
8117 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
8118 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
8119 msgstr ""
8120 "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、そ"
8121 "れを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロ"
8122 "ケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
8123
8124 #. type: SS
8125 #: build/C/man3/printf.3:388
8126 #, no-wrap
8127 msgid "The field width"
8128 msgstr "フィールド幅"
8129
8130 #. type: Plain text
8131 #: build/C/man3/printf.3:404
8132 msgid ""
8133 "An optional decimal digit string (with nonzero first digit) specifying a "
8134 "minimum field width.  If the converted value has fewer characters than the "
8135 "field width, it will be padded with spaces on the left (or right, if the "
8136 "left-adjustment flag has been given).  Instead of a decimal digit string one "
8137 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
8138 "the field width is given in the next argument, or in the I<m>-th argument, "
8139 "respectively, which must be of type I<int>.  A negative field width is taken "
8140 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
8141 "nonexistent or small field width cause truncation of a field; if the result "
8142 "of a conversion is wider than the field width, the field is expanded to "
8143 "contain the conversion result."
8144 msgstr ""
8145 "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以"
8146 "外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少な"
8147 "い場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を"
8148 "埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書く"
8149 "こともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数を"
8150 "フィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければな"
8151 "らない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数"
8152 "のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりして"
8153 "も、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広"
8154 "かった場合、 フィールドは変換結果が入る幅に広げられる。"
8155
8156 #. type: SS
8157 #: build/C/man3/printf.3:404
8158 #, no-wrap
8159 msgid "The precision"
8160 msgstr "精度"
8161
8162 #. type: Plain text
8163 #: build/C/man3/printf.3:440
8164 msgid ""
8165 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
8166 "optional decimal digit string.  Instead of a decimal digit string one may "
8167 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
8168 "precision is given in the next argument, or in the m-th argument, "
8169 "respectively, which must be of type I<int>.  If the precision is given as "
8170 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
8171 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
8172 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
8173 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
8174 "the maximum number of significant digits for B<g> and B<G> conversions, or "
8175 "the maximum number of characters to be printed from a string for B<s> and "
8176 "B<S> conversions."
8177 msgstr ""
8178 "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式"
8179 "で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$"
8180 "\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き"
8181 "数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> "
8182 "型でなければならない)。 精度として \\(aq.\\(aq だけが指定されたり、精度が負の"
8183 "数だった場合、 精度はゼロとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変"
8184 "換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> "
8185 "変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換で"
8186 "は、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力され"
8187 "る最大文字数を指定する。"
8188
8189 #. type: SS
8190 #: build/C/man3/printf.3:440
8191 #, no-wrap
8192 msgid "The length modifier"
8193 msgstr "長さ修飾子"
8194
8195 #. type: Plain text
8196 #: build/C/man3/printf.3:450
8197 msgid ""
8198 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
8199 "B<X> conversion."
8200 msgstr ""
8201 "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
8202
8203 #. type: TP
8204 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:291
8205 #, no-wrap
8206 msgid "B<hh>"
8207 msgstr "B<hh>"
8208
8209 #. type: Plain text
8210 #: build/C/man3/printf.3:461
8211 msgid ""
8212 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
8213 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
8214 "I<signed char> argument."
8215 msgstr ""
8216 "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換"
8217 "に対応する引き数が I<signed char> へのポインタであることを示す。"
8218
8219 #. type: TP
8220 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:281
8221 #, no-wrap
8222 msgid "B<h>"
8223 msgstr "B<h>"
8224
8225 #. type: Plain text
8226 #: build/C/man3/printf.3:472
8227 msgid ""
8228 "A following integer conversion corresponds to a I<short int> or I<unsigned "
8229 "short int> argument, or a following B<n> conversion corresponds to a pointer "
8230 "to a I<short int> argument."
8231 msgstr ""
8232 "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変"
8233 "換に対応する引き数が I<short int> へのポインタであることを示す。"
8234
8235 #. type: TP
8236 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:308
8237 #, no-wrap
8238 msgid "B<l>"
8239 msgstr "B<l>"
8240
8241 #. type: Plain text
8242 #: build/C/man3/printf.3:491
8243 msgid ""
8244 "(ell) A following integer conversion corresponds to a I<long int> or "
8245 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
8246 "a pointer to a I<long int> argument, or a following B<c> conversion "
8247 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
8248 "corresponds to a pointer to I<wchar_t> argument."
8249 msgstr ""
8250 "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 "
8251 "B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> "
8252 "変換では I<wchar_t> へのポインタであることを示す。"
8253
8254 #. type: TP
8255 #: build/C/man3/printf.3:491
8256 #, no-wrap
8257 msgid "B<ll>"
8258 msgstr "B<ll> (エルエル)"
8259
8260 #. type: Plain text
8261 #: build/C/man3/printf.3:503
8262 msgid ""
8263 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
8264 "or I<unsigned long long int> argument, or a following B<n> conversion "
8265 "corresponds to a pointer to a I<long long int> argument."
8266 msgstr ""
8267 "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> "
8268 "で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
8269
8270 #. type: TP
8271 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:335
8272 #, no-wrap
8273 msgid "B<L>"
8274 msgstr "B<L>"
8275
8276 #. type: Plain text
8277 #: build/C/man3/printf.3:519
8278 msgid ""
8279 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
8280 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
8281 "not.)"
8282 msgstr ""
8283 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long "
8284 "double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では"
8285 "認められていない。)"
8286
8287 #. type: TP
8288 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:351
8289 #, no-wrap
8290 msgid "B<q>"
8291 msgstr "B<q>"
8292
8293 #. type: Plain text
8294 #: build/C/man3/printf.3:525
8295 msgid ""
8296 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
8297 "B<ll>."
8298 msgstr ""
8299 "(\"quad\"。 4.4BSD と Linux libc5 のみ有効。使ってはならない。)  B<ll> と同じ"
8300 "意味である。"
8301
8302 #. type: TP
8303 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:299
8304 #, no-wrap
8305 msgid "B<j>"
8306 msgstr "B<j>"
8307
8308 #. type: Plain text
8309 #: build/C/man3/printf.3:532
8310 msgid ""
8311 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
8312 "argument."
8313 msgstr ""
8314 "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> であることを示す。"
8315
8316 #. type: TP
8317 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:363
8318 #, no-wrap
8319 msgid "B<z>"
8320 msgstr "B<z>"
8321
8322 #. type: Plain text
8323 #: build/C/man3/printf.3:543
8324 msgid ""
8325 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
8326 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
8327 msgstr ""
8328 "整数変換に対応する引き数が I<size_t> か I<ssize_t> であることを示す。 (Linux "
8329 "libc5 では、これを指定するのに B<Z> を用いる。使ってはならない。)"
8330
8331 #. type: TP
8332 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:356
8333 #, no-wrap
8334 msgid "B<t>"
8335 msgstr "B<t>"
8336
8337 #. type: Plain text
8338 #: build/C/man3/printf.3:548
8339 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
8340 msgstr "整数変換に対応する引き数が I<ptrdiff_t> であることを示す。"
8341
8342 #. type: Plain text
8343 #: build/C/man3/printf.3:577
8344 msgid ""
8345 "The SUSv2 only knows about the length modifiers B<h> (in B<hd>, B<hi>, "
8346 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
8347 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
8348 msgstr ""
8349 "SUSv2 で長さ修飾子として使用できるのは、 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, "
8350 "B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, "
8351 "B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけである。"
8352
8353 #. type: SS
8354 #: build/C/man3/printf.3:577
8355 #, no-wrap
8356 msgid "The conversion specifier"
8357 msgstr "変換指定子"
8358
8359 #. type: Plain text
8360 #: build/C/man3/printf.3:580
8361 msgid ""
8362 "A character that specifies the type of conversion to be applied.  The "
8363 "conversion specifiers and their meanings are:"
8364 msgstr ""
8365 "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
8366
8367 #. type: TP
8368 #: build/C/man3/printf.3:580
8369 #, no-wrap
8370 msgid "B<d>, B<i>"
8371 msgstr "B<d>, B<i>"
8372
8373 #. type: Plain text
8374 #: build/C/man3/printf.3:590
8375 msgid ""
8376 "The I<int> argument is converted to signed decimal notation.  The precision, "
8377 "if any, gives the minimum number of digits that must appear; if the "
8378 "converted value requires fewer digits, it is padded on the left with zeros.  "
8379 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
8380 "the output is empty."
8381 msgstr ""
8382 "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定し"
8383 "た桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が "
8384 "0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示"
8385 "的に精度として 0 が指定されていると、 出力は空文字列となる。"
8386
8387 #. type: TP
8388 #: build/C/man3/printf.3:590
8389 #, no-wrap
8390 msgid "B<o>, B<u>, B<x>, B<X>"
8391 msgstr "B<o>, B<u>, B<x>, B<X>"
8392
8393 #. type: Plain text
8394 #: build/C/man3/printf.3:617
8395 msgid ""
8396 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
8397 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
8398 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
8399 "used for B<X> conversions.  The precision, if any, gives the minimum number "
8400 "of digits that must appear; if the converted value requires fewer digits, it "
8401 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
8402 "printed with an explicit precision 0, the output is empty."
8403 msgstr ""
8404 "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号"
8405 "なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 "
8406 "B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は"
8407 "必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋め"
8408 "られる。"
8409
8410 #. type: TP
8411 #: build/C/man3/printf.3:617
8412 #, no-wrap
8413 msgid "B<e>, B<E>"
8414 msgstr "B<e>, B<E>"
8415
8416 #. type: Plain text
8417 #: build/C/man3/printf.3:622
8418 msgid "The I<double> argument is rounded and converted in the style"
8419 msgstr "I<double> 引き数を丸めて"
8420
8421 #. type: Plain text
8422 #: build/C/man3/printf.3:637
8423 msgid ""
8424 "[-]dB<\\&.>dddB<e>\\*(Pmdd where there is one digit before the decimal-point "
8425 "character and the number of digits after it is equal to the precision; if "
8426 "the precision is missing, it is taken as 6; if the precision is zero, no "
8427 "decimal-point character appears.  An B<E> conversion uses the letter B<E> "
8428 "(rather than B<e>)  to introduce the exponent.  The exponent always contains "
8429 "at least two digits; if the value is zero, the exponent is 00."
8430 msgstr ""
8431 "[-]dB<\\&.>dddB<e>\\*(Pmdd の形に変換する。 小数点の前には一桁の数字があり、"
8432 "小数点以下の桁数は精度で指定された 桁数になる。精度は指定されなかった場合 6 "
8433 "とみなされる。 精度が 0 の場合には、小数点以下は表示されない。 B<E> 変換で"
8434 "は、指数を表現するときに (B<e> ではなく)  B<E> が使われる。 指数部分は少なく"
8435 "とも 2桁表示される。 つまり、指数の値が 0 の場合には、00 と表示される。"
8436
8437 #. type: TP
8438 #: build/C/man3/printf.3:637
8439 #, no-wrap
8440 msgid "B<f>, B<F>"
8441 msgstr "B<f>, B<F>"
8442
8443 #. type: Plain text
8444 #: build/C/man3/printf.3:648
8445 msgid ""
8446 "The I<double> argument is rounded and converted to decimal notation in the "
8447 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
8448 "character is equal to the precision specification.  If the precision is "
8449 "missing, it is taken as 6; if the precision is explicitly zero, no decimal-"
8450 "point character appears.  If a decimal point appears, at least one digit "
8451 "appears before it."
8452 msgstr ""
8453 "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の"
8454 "後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 とし"
8455 "て扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示され"
8456 "ない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
8457
8458 #. type: Plain text
8459 #: build/C/man3/printf.3:659
8460 msgid ""
8461 "(The SUSv2 does not know about B<F> and says that character string "
8462 "representations for infinity and NaN may be made available.  The C99 "
8463 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
8464 "starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF"
8465 "\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
8466 msgstr ""
8467 "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を\n"
8468 "行ってもよいことになっている。\n"
8469 " C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示"
8470 "し、\n"
8471 "NaN は文字列の先頭に `nan' をつけて表示するように規定されている。\n"
8472 "B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
8473
8474 #. type: TP
8475 #: build/C/man3/printf.3:659
8476 #, no-wrap
8477 msgid "B<g>, B<G>"
8478 msgstr "B<g>, B<G>"
8479
8480 #. type: Plain text
8481 #: build/C/man3/printf.3:684
8482 msgid ""
8483 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
8484 "for B<G> conversions).  The precision specifies the number of significant "
8485 "digits.  If the precision is missing, 6 digits are given; if the precision "
8486 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
8487 "conversion is less than -4 or greater than or equal to the precision.  "
8488 "Trailing zeros are removed from the fractional part of the result; a decimal "
8489 "point appears only if it is followed by at least one digit."
8490 msgstr ""
8491 "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変"
8492 "換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなさ"
8493 "れる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小"
8494 "さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の"
8495 "末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも"
8496 "一つある場合にだけである。"
8497
8498 #. type: TP
8499 #: build/C/man3/printf.3:684
8500 #, no-wrap
8501 msgid "B<a>, B<A>"
8502 msgstr "B<a>, B<A>"
8503
8504 #. type: Plain text
8505 #: build/C/man3/printf.3:708
8506 msgid ""
8507 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
8508 "to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<"
8509 "\\&.>hhhhB<p>\\*(Pmd; for B<A> conversion the prefix B<0X>, the letters "
8510 "ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal "
8511 "digit before the decimal point, and the number of digits after it is equal "
8512 "to the precision.  The default precision suffices for an exact "
8513 "representation of the value if an exact representation in base 2 exists and "
8514 "otherwise is sufficiently large to distinguish values of type I<double>.  "
8515 "The digit before the decimal point is unspecified for nonnormalized numbers, "
8516 "and nonzero but otherwise unspecified for normalized numbers."
8517 msgstr ""
8518 "(C99 にはあるが SUSv2 にはない)  B<a> 変換では、 I<double> 引き数を (abcdef "
8519 "の文字を使って)  [-]B<0x>hB<\\&.>hhhhB<p>\\*(Pmd; 形式の 16 進表記に変換す"
8520 "る。 B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。 "
8521 "小数点の前には 1桁の16進数が置かれ、小数点の後ろの桁数は 精度で指定された値と"
8522 "なる。 デフォルトの精度は、その値が 2進数で正確に表現できる場合には、 その値"
8523 "を正確に表現できる桁数となる。それ以外の場合は、 I<double> 型の値を区別するの"
8524 "に十分な大きさとなる。 小数点の前の数字は、正規化されていない数の場合はいくつ"
8525 "になるか分からない。 正規化された数の場合は、 0 以外の値になるが、いくつにな"
8526 "るかは分からない。"
8527
8528 #. type: TP
8529 #: build/C/man3/printf.3:708 build/C/man3/scanf.3:456
8530 #: build/C/man3/wprintf.3:132
8531 #, no-wrap
8532 msgid "B<c>"
8533 msgstr "B<c>"
8534
8535 #. type: Plain text
8536 #: build/C/man3/printf.3:726
8537 msgid ""
8538 "If no B<l> modifier is present, the I<int> argument is converted to an "
8539 "I<unsigned char>, and the resulting character is written.  If an B<l> "
8540 "modifier is present, the I<wint_t> (wide character) argument is converted to "
8541 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
8542 "conversion state starting in the initial state, and the resulting multibyte "
8543 "string is written."
8544 msgstr ""
8545 "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果"
8546 "に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き"
8547 "数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変"
8548 "換し、 変換されたマルチバイト文字列を出力する。"
8549
8550 #. type: TP
8551 #: build/C/man3/printf.3:726 build/C/man3/scanf.3:448
8552 #: build/C/man3/wprintf.3:146
8553 #, no-wrap
8554 msgid "B<s>"
8555 msgstr "B<s>"
8556
8557 #. type: Plain text
8558 #: build/C/man3/printf.3:741
8559 msgid ""
8560 "If no B<l> modifier is present: The I<const char *> argument is expected to "
8561 "be a pointer to an array of character type (pointer to a string).  "
8562 "Characters from the array are written up to (but not including) a "
8563 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
8564 "than the number specified are written.  If a precision is given, no null "
8565 "byte need be present; if the precision is not specified, or is greater than "
8566 "the size of the array, the array must contain a terminating null byte."
8567 msgstr ""
8568 "B<l> 修飾子がない場合、 引き数は I<const char *> 型で文字型の配列へのポイン"
8569 "タ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の "
8570 "NULL バイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されな"
8571 "い)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定さ"
8572 "れた場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、"
8573 "精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでい"
8574 "なければならない。"
8575
8576 #. type: Plain text
8577 #: build/C/man3/printf.3:768
8578 msgid ""
8579 "If an B<l> modifier is present: The I<const wchar_t *> argument is expected "
8580 "to be a pointer to an array of wide characters.  Wide characters from the "
8581 "array are converted to multibyte characters (each by a call to the B<wcrtomb>"
8582 "(3)  function, with a conversion state starting in the initial state before "
8583 "the first wide character), up to and including a terminating null wide "
8584 "character.  The resulting multibyte characters are written up to (but not "
8585 "including) the terminating null byte.  If a precision is specified, no more "
8586 "bytes than the number specified are written, but no partial multibyte "
8587 "characters are written.  Note that the precision determines the number of "
8588 "I<bytes> written, not the number of I<wide characters> or I<screen "
8589 "positions>.  The array must contain a terminating null wide character, "
8590 "unless a precision is given and it is so small that the number of bytes "
8591 "written exceeds it before the end of the array is reached."
8592 msgstr ""
8593 "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t *> 型でワイド文字"
8594 "の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字毎"
8595 "に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド文"
8596 "字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われ"
8597 "る)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が 出てくる"
8598 "まで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列"
8599 "は、終端の NULL バイトが出てくるまで 出力される (終端の NULL バイトは出力され"
8600 "ない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、"
8601 "マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定"
8602 "するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないこと"
8603 "に注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数"
8604 "が 精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよ"
8605 "い。 それ以外の場合は、必ず配列は NULL ワイド文字で終端されていなければならな"
8606 "い。"
8607
8608 #. type: TP
8609 #: build/C/man3/printf.3:768
8610 #, no-wrap
8611 msgid "B<C>"
8612 msgstr "B<C>"
8613
8614 #. type: Plain text
8615 #: build/C/man3/printf.3:774
8616 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
8617 msgstr "(C99 にはないが SUSv2 にはある)  B<lc> と同じ。使ってはならない。"
8618
8619 #. type: TP
8620 #: build/C/man3/printf.3:774
8621 #, no-wrap
8622 msgid "B<S>"
8623 msgstr "B<S>"
8624
8625 #. type: Plain text
8626 #: build/C/man3/printf.3:780
8627 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
8628 msgstr "(C99 にはないが SUSv2 にはある)  B<ls> と同じ。使ってはならない。"
8629
8630 #. type: TP
8631 #: build/C/man3/printf.3:780 build/C/man3/scanf.3:500
8632 #, no-wrap
8633 msgid "B<p>"
8634 msgstr "B<p>"
8635
8636 #. type: Plain text
8637 #: build/C/man3/printf.3:788
8638 msgid ""
8639 "The I<void *> pointer argument is printed in hexadecimal (as if by B<%#x> or "
8640 "B<%#lx>)."
8641 msgstr ""
8642 "I<void *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
8643
8644 #. type: TP
8645 #: build/C/man3/printf.3:788 build/C/man3/scanf.3:508
8646 #, no-wrap
8647 msgid "B<n>"
8648 msgstr "B<n>"
8649
8650 #. type: Plain text
8651 #: build/C/man3/printf.3:795
8652 msgid ""
8653 "The number of characters written so far is stored into the integer indicated "
8654 "by the I<int *> (or variant) pointer argument.  No argument is converted."
8655 msgstr ""
8656 "これまでに出力された文字数を I<int *> (または類似の型) のポインタ引き数が指す"
8657 "整数に保存する。 引き数の変換は行われない。"
8658
8659 #. type: TP
8660 #: build/C/man3/printf.3:795
8661 #, no-wrap
8662 msgid "B<m>"
8663 msgstr "B<m>"
8664
8665 #. type: Plain text
8666 #: build/C/man3/printf.3:801
8667 msgid ""
8668 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
8669 "required."
8670 msgstr ""
8671 "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
8672
8673 #. type: TP
8674 #: build/C/man3/printf.3:801 build/C/man3/scanf.3:374
8675 #, no-wrap
8676 msgid "B<%>"
8677 msgstr "B<%>"
8678
8679 #. type: Plain text
8680 #: build/C/man3/printf.3:807
8681 msgid ""
8682 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
8683 "conversion specification is \\(aq%%\\(aq."
8684 msgstr ""
8685 "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%"
8686 "%\" となる。"
8687
8688 #. type: Plain text
8689 #: build/C/man3/printf.3:822
8690 msgid ""
8691 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8692 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
8693 "B<vsnprintf>()  functions conform to C99."
8694 msgstr ""
8695 "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
8696 "B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と "
8697 "B<vsnprintf>()  は C99 に準拠している。"
8698
8699 #. type: Plain text
8700 #: build/C/man3/printf.3:835
8701 msgid ""
8702 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
8703 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
8704 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
8705 "this case, and gives the return value (as always)  as the number of "
8706 "characters that would have been written in case the output string has been "
8707 "large enough."
8708 msgstr ""
8709 "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 "
8710 "SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何"
8711 "か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を "
8712 "NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に"
8713 "出力されるであろう文字数を返す。"
8714
8715 #. type: Plain text
8716 #: build/C/man3/printf.3:849
8717 msgid ""
8718 "Linux libc4 knows about the five C standard flags.  It knows about the "
8719 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
8720 "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 "
8721 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
8722 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
8723 "caused serious bugs later, when support for B<%D> disappeared.)  No locale-"
8724 "dependent radix character, no thousands' separator, no NaN or infinity, no "
8725 "\"%m$\" and \"*m$\"."
8726 msgstr ""
8727 "Linux libc4 では、 5 つの C 標準のフラグ、 長さ修飾子 B<h>, B<l>, B<L>、変換 "
8728 "B<c>, B<d>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G>, B<i>, B<n>, B<o>, B<p>, "
8729 "B<s>, B<u>, B<x>, B<X> が使える。 但し B<F> は B<f> と同義である。 また、 "
8730 "B<D>, B<O>, and B<U> を B<ld>, B<lo>, and B<lu> と同じものとして使える (これ"
8731 "はまずい仕様で、 後に B<%D> の対応が打ち切られた時に深刻なバグを 引き起こし"
8732 "た)。ロケール依存の小数点、1000 区切り、 NaN と無限、 \"%m$\" と \"*m$\" は使"
8733 "えない。"
8734
8735 #. type: Plain text
8736 #: build/C/man3/printf.3:860
8737 msgid ""
8738 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
8739 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
8740 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
8741 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
8742 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
8743 "outputs I<strerror(errno)>."
8744 msgstr ""
8745 "Linux libc5 では、 5 つの C 標準のフラグと \\(aq フラグ、ロケール、 \"%m$\" "
8746 "と \"*m$\" が使える。 また、長さ修飾子 B<h>, B<l>, B<L>, B<Z>, iand B<q> が使"
8747 "えるが、 B<L> と B<q> は両方とも I<long double> と I<long long int> に対応し"
8748 "ている (これはバグである)。 現在では変換 B<F>, B<D>, B<O>, B<U> は認識されな"
8749 "いが、変換文字 B<m> が追加された。これは I<strerror(errno)> を出力するもので"
8750 "ある。"
8751
8752 #. type: Plain text
8753 #: build/C/man3/printf.3:862
8754 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
8755 msgstr "glibc 2.0 では、変換文字 B<C> と B<S> が追加された。"
8756
8757 #. type: Plain text
8758 #: build/C/man3/printf.3:865
8759 msgid ""
8760 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
8761 "characters B<a> and B<A>."
8762 msgstr ""
8763 "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追"
8764 "加された。"
8765
8766 #. type: Plain text
8767 #: build/C/man3/printf.3:868
8768 msgid ""
8769 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
8770 "flag character B<I>."
8771 msgstr ""
8772 "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が"
8773 "追加された。"
8774
8775 #. type: Plain text
8776 #: build/C/man3/printf.3:870
8777 msgid "Some programs imprudently rely on code such as the following"
8778 msgstr ""
8779 "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログ"
8780 "ラムがある。"
8781
8782 #. type: Plain text
8783 #: build/C/man3/printf.3:872
8784 #, no-wrap
8785 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
8786 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
8787
8788 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
8789 #. type: Plain text
8790 #: build/C/man3/printf.3:888
8791 msgid ""
8792 "to append text to I<buf>.  However, the standards explicitly note that the "
8793 "results are undefined if source and destination buffers overlap when calling "
8794 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
8795 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
8796 "such as the above will B<not> produce the expected results."
8797 msgstr ""
8798 "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), "
8799 "B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なってい"
8800 "た場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョ"
8801 "ンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した"
8802 "結果が得られ「ない」ことがある。"
8803
8804 #.  .SH HISTORY
8805 #.  UNIX V7 defines the three routines
8806 #.  .BR printf (),
8807 #.  .BR fprintf (),
8808 #.  .BR sprintf (),
8809 #.  and has the flag \-, the width or precision *, the length modifier l,
8810 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
8811 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
8812 #.  #, + and <space> and no longer mentions D,O,U,X.
8813 #.  2.11BSD has
8814 #.  .BR vprintf (),
8815 #.  .BR vfprintf (),
8816 #.  .BR vsprintf (),
8817 #.  and warns not to use D,O,U,X.
8818 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
8819 #.  and the conversions n, p, E, G, X (with current meaning)
8820 #.  and deprecates D,O,U.
8821 #.  4.4BSD introduces the functions
8822 #.  .BR snprintf ()
8823 #.  and
8824 #.  .BR vsnprintf (),
8825 #.  and the length modifier q.
8826 #.  FreeBSD also has functions
8827 #.  .BR asprintf ()
8828 #.  and
8829 #.  .BR vasprintf (),
8830 #.  that allocate a buffer large enough for
8831 #.  .BR sprintf ().
8832 #.  In glibc there are functions
8833 #.  .BR dprintf ()
8834 #.  and
8835 #.  .BR vdprintf ()
8836 #.  that print to a file descriptor instead of a stream.
8837 #. type: Plain text
8838 #: build/C/man3/printf.3:930
8839 msgid ""
8840 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
8841 "conforms to the C99 standard, that is, behaves as described above, since "
8842 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
8843 "was truncated."
8844 msgstr ""
8845 "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は "
8846 "C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が"
8847 "切り詰められた場合は -1 を返す。"
8848
8849 #. type: Plain text
8850 #: build/C/man3/printf.3:947
8851 msgid ""
8852 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
8853 "callers must be careful not to overflow the actual space; this is often "
8854 "impossible to assure.  Note that the length of the strings produced is "
8855 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
8856 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
8857 msgstr ""
8858 "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定する"
8859 "ので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 し"
8860 "かし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケー"
8861 "ル依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と "
8862 "B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
8863
8864 #. type: Plain text
8865 #: build/C/man3/printf.3:960
8866 msgid ""
8867 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
8868 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
8869 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
8870 "libc4 leads to serious security problems."
8871 msgstr ""
8872 "Linux libc4.[45] には B<snprintf>()  はないが、 libbsd が提供されており、 そ"
8873 "の中には B<sprintf>()  と等価な (つまり I<size> 引き数を無視する)  "
8874 "B<snprintf>()  がある。 したがって、初期の libc4 で B<snprintf>()  を使うと、"
8875 "深刻なセキュリティ問題を引き起こすことがある。"
8876
8877 #.  .PP
8878 #.  Some floating-point conversions under early libc4
8879 #.  caused memory leaks.
8880 #. type: Plain text
8881 #: build/C/man3/printf.3:974
8882 msgid ""
8883 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
8884 "contain a % character.  If I<foo> comes from untrusted user input, it may "
8885 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
8886 "a security hole."
8887 msgstr ""
8888 "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら "
8889 "I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できない"
8890 "ユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあ"
8891 "り、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホー"
8892 "ルを作ることになるかもしれない。"
8893
8894 #. type: Plain text
8895 #: build/C/man3/printf.3:977
8896 msgid "To print \\*(Pi to five decimal places:"
8897 msgstr "\\*(Pi を 5 桁で出力する。"
8898
8899 #. type: Plain text
8900 #: build/C/man3/printf.3:983
8901 #, no-wrap
8902 msgid ""
8903 "#include E<lt>math.hE<gt>\n"
8904 "#include E<lt>stdio.hE<gt>\n"
8905 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
8906 msgstr ""
8907 "#include E<lt>math.hE<gt>\n"
8908 "#include E<lt>stdio.hE<gt>\n"
8909 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
8910
8911 #. type: Plain text
8912 #: build/C/man3/printf.3:992
8913 msgid ""
8914 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
8915 "I<weekday> and I<month> are pointers to strings:"
8916 msgstr ""
8917 "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と "
8918 "I<month> は文字列へのポインタである)"
8919
8920 #. type: Plain text
8921 #: build/C/man3/printf.3:998
8922 #, no-wrap
8923 msgid ""
8924 "#include E<lt>stdio.hE<gt>\n"
8925 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
8926 "        weekday, month, day, hour, min);\n"
8927 msgstr ""
8928 "#include E<lt>stdio.hE<gt>\n"
8929 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
8930 "\tweekday, month, day, hour, min);\n"
8931
8932 #. type: Plain text
8933 #: build/C/man3/printf.3:1004
8934 msgid ""
8935 "Many countries use the day-month-year order.  Hence, an internationalized "
8936 "version must be able to print the arguments in an order specified by the "
8937 "format:"
8938 msgstr ""
8939 "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された"
8940 "順番で 引き数を表示できなければならない。"
8941
8942 #. type: Plain text
8943 #: build/C/man3/printf.3:1010
8944 #, no-wrap
8945 msgid ""
8946 "#include E<lt>stdio.hE<gt>\n"
8947 "fprintf(stdout, format,\n"
8948 "        weekday, month, day, hour, min);\n"
8949 msgstr ""
8950 "#include E<lt>stdio.hE<gt>\n"
8951 "fprintf(stdout, format,\n"
8952 "\tweekday, month, day, hour, min);\n"
8953
8954 #. type: Plain text
8955 #: build/C/man3/printf.3:1017
8956 msgid ""
8957 "where I<format> depends on locale, and may permute the arguments.  With the "
8958 "value:"
8959 msgstr ""
8960 "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 "
8961 "I<format> が"
8962
8963 #. type: Plain text
8964 #: build/C/man3/printf.3:1021
8965 #, no-wrap
8966 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
8967 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
8968
8969 #. type: Plain text
8970 #: build/C/man3/printf.3:1025
8971 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
8972 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
8973
8974 #. type: Plain text
8975 #: build/C/man3/printf.3:1028
8976 msgid ""
8977 "To allocate a sufficiently large string and print into it (code correct for "
8978 "both glibc 2.0 and glibc 2.1):"
8979 msgstr ""
8980 "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 "
8981 "と glibc 2.1 の両方で正しく動作するコード):"
8982
8983 #. type: Plain text
8984 #: build/C/man3/printf.3:1033
8985 #, no-wrap
8986 msgid ""
8987 "#include E<lt>stdio.hE<gt>\n"
8988 "#include E<lt>stdlib.hE<gt>\n"
8989 "#include E<lt>stdarg.hE<gt>\n"
8990 msgstr ""
8991 "#include E<lt>stdio.hE<gt>\n"
8992 "#include E<lt>stdlib.hE<gt>\n"
8993 "#include E<lt>stdarg.hE<gt>\n"
8994
8995 #. type: Plain text
8996 #: build/C/man3/printf.3:1041
8997 #, no-wrap
8998 msgid ""
8999 "char *\n"
9000 "make_message(const char *fmt, ...)\n"
9001 "{\n"
9002 "    int n;\n"
9003 "    int size = 100;     /* Guess we need no more than 100 bytes. */\n"
9004 "    char *p, *np;\n"
9005 "    va_list ap;\n"
9006 msgstr ""
9007 "char *\n"
9008 "make_message(const char *fmt, ...)\n"
9009 "{\n"
9010 "    int n;\n"
9011 "    int size = 100;     /* Guess we need no more than 100 bytes. */\n"
9012 "    char *p, *np;\n"
9013 "    va_list ap;\n"
9014
9015 #. type: Plain text
9016 #: build/C/man3/printf.3:1044
9017 #, no-wrap
9018 msgid ""
9019 "    if ((p = malloc(size)) == NULL)\n"
9020 "        return NULL;\n"
9021 msgstr ""
9022 "    if ((p = malloc(size)) == NULL)\n"
9023 "        return NULL;\n"
9024
9025 #. type: Plain text
9026 #: build/C/man3/printf.3:1046
9027 #, no-wrap
9028 msgid "    while (1) {\n"
9029 msgstr "    while (1) {\n"
9030
9031 #. type: Plain text
9032 #: build/C/man3/printf.3:1048
9033 #, no-wrap
9034 msgid "        /* Try to print in the allocated space. */\n"
9035 msgstr "        /* Try to print in the allocated space. */\n"
9036
9037 #. type: Plain text
9038 #: build/C/man3/printf.3:1052
9039 #, no-wrap
9040 msgid ""
9041 "        va_start(ap, fmt);\n"
9042 "        n = vsnprintf(p, size, fmt, ap);\n"
9043 "        va_end(ap);\n"
9044 msgstr ""
9045 "        va_start(ap, fmt);\n"
9046 "        n = vsnprintf(p, size, fmt, ap);\n"
9047 "        va_end(ap);\n"
9048
9049 #. type: Plain text
9050 #: build/C/man3/printf.3:1054
9051 #, no-wrap
9052 msgid "        /* If that worked, return the string. */\n"
9053 msgstr "        /* If that worked, return the string. */\n"
9054
9055 #. type: Plain text
9056 #: build/C/man3/printf.3:1057
9057 #, no-wrap
9058 msgid ""
9059 "        if (n E<gt> -1 && n E<lt> size)\n"
9060 "            return p;\n"
9061 msgstr ""
9062 "        if (n E<gt> -1 && n E<lt> size)\n"
9063 "            return p;\n"
9064
9065 #. type: Plain text
9066 #: build/C/man3/printf.3:1059
9067 #, no-wrap
9068 msgid "        /* Else try again with more space. */\n"
9069 msgstr "        /* Else try again with more space. */\n"
9070
9071 #. type: Plain text
9072 #: build/C/man3/printf.3:1064
9073 #, no-wrap
9074 msgid ""
9075 "        if (n E<gt> -1)    /* glibc 2.1 */\n"
9076 "            size = n+1; /* precisely what is needed */\n"
9077 "        else           /* glibc 2.0 */\n"
9078 "            size *= 2;  /* twice the old size */\n"
9079 msgstr ""
9080 "        if (n E<gt> -1)    /* glibc 2.1 */\n"
9081 "            size = n+1; /* precisely what is needed */\n"
9082 "        else           /* glibc 2.0 */\n"
9083 "            size *= 2;  /* twice the old size */\n"
9084
9085 #. type: Plain text
9086 #: build/C/man3/printf.3:1073
9087 #, no-wrap
9088 msgid ""
9089 "        if ((np = realloc (p, size)) == NULL) {\n"
9090 "            free(p);\n"
9091 "            return NULL;\n"
9092 "        } else {\n"
9093 "            p = np;\n"
9094 "        }\n"
9095 "    }\n"
9096 "}\n"
9097 msgstr ""
9098 "        if ((np = realloc (p, size)) == NULL) {\n"
9099 "            free(p);\n"
9100 "            return NULL;\n"
9101 "        } else {\n"
9102 "            p = np;\n"
9103 "        }\n"
9104 "    }\n"
9105 "}\n"
9106
9107 #. type: Plain text
9108 #: build/C/man3/printf.3:1083
9109 msgid ""
9110 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9111 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9112 msgstr ""
9113 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
9114 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
9115
9116 #. type: TH
9117 #: build/C/man3/puts.3:24
9118 #, no-wrap
9119 msgid "PUTS"
9120 msgstr "PUTS"
9121
9122 #. type: Plain text
9123 #: build/C/man3/puts.3:27
9124 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
9125 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
9126
9127 #. type: Plain text
9128 #: build/C/man3/puts.3:32
9129 #, no-wrap
9130 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9131 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9132
9133 #. type: Plain text
9134 #: build/C/man3/puts.3:34
9135 #, no-wrap
9136 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9137 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
9138
9139 #. type: Plain text
9140 #: build/C/man3/puts.3:36
9141 #, no-wrap
9142 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9143 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
9144
9145 #. type: Plain text
9146 #: build/C/man3/puts.3:38
9147 #, no-wrap
9148 msgid "B<int putchar(int >I<c>B<);>\n"
9149 msgstr "B<int putchar(int >I<c>B<);>\n"
9150
9151 #. type: Plain text
9152 #: build/C/man3/puts.3:40
9153 #, no-wrap
9154 msgid "B<int puts(const char *>I<s>B<);>\n"
9155 msgstr "B<int puts(const char *>I<s>B<);>\n"
9156
9157 #. type: Plain text
9158 #: build/C/man3/puts.3:49
9159 msgid ""
9160 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
9161 "I<stream>."
9162 msgstr ""
9163 "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> "
9164 "に書き込む。"
9165
9166 #. type: Plain text
9167 #: build/C/man3/puts.3:56
9168 msgid ""
9169 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
9170 "null byte (\\(aq\\e0\\(aq)."
9171 msgstr ""
9172 "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端の NULL バイ"
9173 "ト (\\(aq\\e0\\(aq) は出力しない。"
9174
9175 #. type: Plain text
9176 #: build/C/man3/puts.3:63
9177 msgid ""
9178 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
9179 "a macro which evaluates I<stream> more than once."
9180 msgstr ""
9181 "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知"
9182 "れないという点を除き、 B<fputc>()  と同じである。"
9183
9184 #. type: Plain text
9185 #: build/C/man3/puts.3:67
9186 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
9187 msgstr "B<putchar(>I<c>B<);> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
9188
9189 #. type: Plain text
9190 #: build/C/man3/puts.3:74
9191 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
9192 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
9193
9194 #. type: Plain text
9195 #: build/C/man3/puts.3:79
9196 msgid ""
9197 "Calls to the functions described here can be mixed with each other and with "
9198 "calls to other output functions from the I<stdio> library for the same "
9199 "output stream."
9200 msgstr ""
9201 "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ラ"
9202 "イブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来"
9203 "る。"
9204
9205 #. type: Plain text
9206 #: build/C/man3/puts.3:94
9207 msgid ""
9208 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
9209 "I<unsigned char> cast to an I<int> or B<EOF> on error."
9210 msgstr ""
9211 "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文"
9212 "字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
9213
9214 #. type: Plain text
9215 #: build/C/man3/puts.3:101
9216 msgid ""
9217 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
9218 "on error."
9219 msgstr ""
9220 "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合"
9221 "は B<EOF> を返す。"
9222
9223 #. type: Plain text
9224 #: build/C/man3/puts.3:110
9225 msgid ""
9226 "It is not advisable to mix calls to output functions from the I<stdio> "
9227 "library with low-level calls to B<write>(2)  for the file descriptor "
9228 "associated with the same output stream; the results will be undefined and "
9229 "very probably not what you want."
9230 msgstr ""
9231 "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた "
9232 "ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用"
9233 "することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能"
9234 "性が高い。"
9235
9236 #. type: Plain text
9237 #: build/C/man3/puts.3:122
9238 msgid ""
9239 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9240 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9241 "(3)"
9242 msgstr ""
9243 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>"
9244 "(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>"
9245 "(3)"
9246
9247 #. type: TH
9248 #: build/C/man2/read.2:35
9249 #, no-wrap
9250 msgid "READ"
9251 msgstr "READ"
9252
9253 #. type: Plain text
9254 #: build/C/man2/read.2:38
9255 msgid "read - read from a file descriptor"
9256 msgstr "read - ファイルディスクリプタから読み込む"
9257
9258 #. type: Plain text
9259 #: build/C/man2/read.2:43
9260 #, no-wrap
9261 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9262 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
9263
9264 #. type: Plain text
9265 #: build/C/man2/read.2:52
9266 msgid ""
9267 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
9268 "into the buffer starting at I<buf>."
9269 msgstr ""
9270 "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 "
9271 "I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
9272
9273 #. type: Plain text
9274 #: build/C/man2/read.2:63
9275 msgid ""
9276 "If I<count> is zero, B<read>()  returns zero and has no other results.  If "
9277 "I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
9278 msgstr ""
9279 "I<count> が 0 ならば、 B<read>()  は 0 を返し、他に何も起きない。 I<count> "
9280 "が B<SSIZE_MAX> より大きければ、結果は特定できない。"
9281
9282 #. type: Plain text
9283 #: build/C/man2/read.2:77
9284 msgid ""
9285 "On success, the number of bytes read is returned (zero indicates end of "
9286 "file), and the file position is advanced by this number.  It is not an error "
9287 "if this number is smaller than the number of bytes requested; this may "
9288 "happen for example because fewer bytes are actually available right now "
9289 "(maybe because we were close to end-of-file, or because we are reading from "
9290 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
9291 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
9292 "this case it is left unspecified whether the file position (if any) changes."
9293 msgstr ""
9294 "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファ"
9295 "イル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエ"
9296 "ラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後"
9297 "に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるか"
9298 "もしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれ"
9299 "は起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。こ"
9300 "の場合はファイル位置が変更されるかどうかは 不定である。"
9301
9302 #. type: TP
9303 #: build/C/man2/read.2:78 build/C/man3/scanf.3:546 build/C/man2/write.2:108
9304 #, no-wrap
9305 msgid "B<EAGAIN>"
9306 msgstr "B<EAGAIN>"
9307
9308 #. type: Plain text
9309 #: build/C/man2/read.2:85
9310 msgid ""
9311 "The file descriptor I<fd> refers to a file other than a socket and has been "
9312 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
9313 msgstr ""
9314 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
9315 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止"
9316 "する状況にある。"
9317
9318 #. type: TP
9319 #: build/C/man2/read.2:85 build/C/man2/write.2:115
9320 #, no-wrap
9321 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
9322 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
9323
9324 #.  Actually EAGAIN on Linux
9325 #. type: Plain text
9326 #: build/C/man2/read.2:96
9327 msgid ""
9328 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
9329 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
9330 "to be returned for this case, and does not require these constants to have "
9331 "the same value, so a portable application should check for both "
9332 "possibilities."
9333 msgstr ""
9334 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
9335 "モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にあ"
9336 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
9337 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
9338 "プリケーションでは、両方の可能性を 確認すべきである。"
9339
9340 #. type: Plain text
9341 #: build/C/man2/read.2:100
9342 msgid "I<fd> is not a valid file descriptor or is not open for reading."
9343 msgstr ""
9344 "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン "
9345 "(open) されていない。"
9346
9347 #. type: Plain text
9348 #: build/C/man2/read.2:104 build/C/man2/write.2:139
9349 msgid "I<buf> is outside your accessible address space."
9350 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
9351
9352 #. type: Plain text
9353 #: build/C/man2/read.2:108
9354 msgid ""
9355 "The call was interrupted by a signal before any data was read; see B<signal>"
9356 "(7)."
9357 msgstr ""
9358 "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
9359
9360 #. type: Plain text
9361 #: build/C/man2/read.2:119
9362 msgid ""
9363 "I<fd> is attached to an object which is unsuitable for reading; or the file "
9364 "was opened with the B<O_DIRECT> flag, and either the address specified in "
9365 "I<buf>, the value specified in I<count>, or the current file offset is not "
9366 "suitably aligned."
9367 msgstr ""
9368 "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイル"
9369 "が B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアド"
9370 "レス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライ"
9371 "ンメントが不適切である。"
9372
9373 #. type: Plain text
9374 #: build/C/man2/read.2:129
9375 msgid ""
9376 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
9377 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
9378 "information."
9379 msgstr ""
9380 "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違っ"
9381 "たサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照の"
9382 "こと。"
9383
9384 #. type: Plain text
9385 #: build/C/man2/read.2:140
9386 msgid ""
9387 "I/O error.  This will happen for example when the process is in a background "
9388 "process group, tries to read from its controlling tty, and either it is "
9389 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
9390 "also occur when there is a low-level I/O error while reading from a disk or "
9391 "tape."
9392 msgstr ""
9393 "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、 それを"
9394 "制御している tty から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 "
9395 "(blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場"
9396 "合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生し"
9397 "た場合にも起こる。"
9398
9399 #. type: Plain text
9400 #: build/C/man2/read.2:144
9401 msgid "I<fd> refers to a directory."
9402 msgstr "I<fd> がディレクトリを参照している。"
9403
9404 #. type: Plain text
9405 #: build/C/man2/read.2:155
9406 msgid ""
9407 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
9408 "allows a B<read>()  that is interrupted after reading some data to return -1 "
9409 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
9410 "read."
9411 msgstr ""
9412 "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX で"
9413 "は、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は "
9414 "(I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト"
9415 "数を返してもよい。"
9416
9417 #. type: Plain text
9418 #: build/C/man2/read.2:169
9419 msgid ""
9420 "On NFS file systems, reading small amounts of data will only update the "
9421 "timestamp the first time, subsequent calls may not do so.  This is caused by "
9422 "client side attribute caching, because most if not all NFS clients leave "
9423 "st_atime (last file access time)  updates to the server and client side "
9424 "reads satisfied from the client's cache will not cause st_atime updates on "
9425 "the server as there are no server side reads.  UNIX semantics can be "
9426 "obtained by disabling client side attribute caching, but in most situations "
9427 "this will substantially increase server load and decrease performance."
9428 msgstr ""
9429 "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新"
9430 "され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシ"
9431 "ングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime "
9432 "(最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッ"
9433 "シュを読むことに満足して いれば、サーバー側での read は発生しないので "
9434 "st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性の"
9435 "キャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況"
9436 "ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
9437
9438 #. type: Plain text
9439 #: build/C/man2/read.2:178
9440 msgid ""
9441 "Many file systems and disks were considered to be fast enough that the "
9442 "implementation of B<O_NONBLOCK> was deemed unnecessary.  So, B<O_NONBLOCK> "
9443 "may not be available on files and/or disks."
9444 msgstr ""
9445 "多くのファイルシステムやディスクは B<O_NONBLOCK> の実装はしなくても済むくらい"
9446 "に十分に高速であると考えられている。 それでそのようなファイルやディスクには "
9447 "B<O_NONBLOCK> は利用できないかもしれない。"
9448
9449 #. type: Plain text
9450 #: build/C/man2/read.2:191
9451 msgid ""
9452 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9453 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9454 "B<fread>(3)"
9455 msgstr ""
9456 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
9457 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
9458 "B<fread>(3)"
9459
9460 #. type: TH
9461 #: build/C/man2/readlink.2:41
9462 #, no-wrap
9463 msgid "READLINK"
9464 msgstr "READLINK"
9465
9466 #. type: TH
9467 #: build/C/man2/readlink.2:41
9468 #, no-wrap
9469 msgid "2011-09-20"
9470 msgstr "2011-09-20"
9471
9472 #. type: Plain text
9473 #: build/C/man2/readlink.2:44
9474 msgid "readlink - read value of a symbolic link"
9475 msgstr "readlink - シンボリックリンクの値を読む"
9476
9477 #. type: Plain text
9478 #: build/C/man2/readlink.2:48
9479 msgid ""
9480 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9481 ">I<bufsiz>B<);>"
9482 msgstr ""
9483 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
9484 ">I<bufsiz>B<);>"
9485
9486 #. type: Plain text
9487 #: build/C/man2/readlink.2:56
9488 msgid "B<readlink>():"
9489 msgstr "B<readlink>():"
9490
9491 #. type: Plain text
9492 #: build/C/man2/readlink.2:59 build/C/man2/symlink.2:50
9493 msgid ""
9494 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9495 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9496 msgstr ""
9497 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
9498 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
9499
9500 #. type: Plain text
9501 #: build/C/man2/readlink.2:75
9502 msgid ""
9503 "B<readlink>()  places the contents of the symbolic link I<path> in the "
9504 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
9505 "null byte to I<buf>.  It will truncate the contents (to a length of "
9506 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
9507 "contents."
9508 msgstr ""
9509 "B<readlink>()  は I<path> で与えられたシンボリックリンクの内容を I<buf> バッ"
9510 "ファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  は "
9511 "NULL バイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小"
9512 "さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
9513
9514 #. type: Plain text
9515 #: build/C/man2/readlink.2:83
9516 msgid ""
9517 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
9518 "error, -1 is returned and I<errno> is set to indicate the error."
9519 msgstr ""
9520 "成功すると、 B<readlink>()  は I<buf> に格納されたバイト数を返す。 エラーの場"
9521 "合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
9522
9523 #. type: Plain text
9524 #: build/C/man2/readlink.2:89
9525 msgid ""
9526 "Search permission is denied for a component of the path prefix.  (See also "
9527 "B<path_resolution>(7).)"
9528 msgstr ""
9529 "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も"
9530 "参照すること)。"
9531
9532 #. type: Plain text
9533 #: build/C/man2/readlink.2:93
9534 msgid "I<buf> extends outside the process's allocated address space."
9535 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
9536
9537 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
9538 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
9539 #.  and this error can also occur if bufsiz < 0.
9540 #.  See: http://thread.gmane.org/gmane.linux.man/380
9541 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
9542 #. type: Plain text
9543 #: build/C/man2/readlink.2:102
9544 msgid "I<bufsiz> is not positive."
9545 msgstr "I<bufsiz> が正でない。"
9546
9547 #. type: Plain text
9548 #: build/C/man2/readlink.2:105
9549 msgid "The named file is not a symbolic link."
9550 msgstr "指定したファイルがシンボリックリンクでない。"
9551
9552 #. type: Plain text
9553 #: build/C/man2/readlink.2:108
9554 msgid "An I/O error occurred while reading from the file system."
9555 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
9556
9557 #. type: Plain text
9558 #: build/C/man2/readlink.2:111
9559 msgid "Too many symbolic links were encountered in translating the pathname."
9560 msgstr "パス名にシンボリックリンクが多すぎる。"
9561
9562 #. type: Plain text
9563 #: build/C/man2/readlink.2:114
9564 msgid "A pathname, or a component of a pathname, was too long."
9565 msgstr "パス名かパス名の一部分が長過ぎる。"
9566
9567 #. type: Plain text
9568 #: build/C/man2/readlink.2:117
9569 msgid "The named file does not exist."
9570 msgstr "その名前のファイルが存在しない。"
9571
9572 #. type: Plain text
9573 #: build/C/man2/readlink.2:123
9574 msgid "A component of the path prefix is not a directory."
9575 msgstr "パスのディレクトリ部分がディレクトリでない。"
9576
9577 #. type: Plain text
9578 #: build/C/man2/readlink.2:128
9579 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
9580 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001."
9581
9582 #. type: Plain text
9583 #: build/C/man2/readlink.2:136
9584 msgid ""
9585 "In versions of glibc up to and including glibc 2.4, the return type of "
9586 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
9587 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
9588 msgstr ""
9589 "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の"
9590 "返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> であ"
9591 "る (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
9592
9593 #. type: Plain text
9594 #: build/C/man2/readlink.2:155
9595 msgid ""
9596 "Using a statically sized buffer might not provide enough room for the "
9597 "symbolic link contents.  The required size for the buffer can be obtained "
9598 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
9599 "link.  However, the number of bytes written by B<readlink>()  should be "
9600 "checked to make sure that the size of the symbolic link did not increase "
9601 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
9602 "also addresses a common portability problem when using I<PATH_MAX> for the "
9603 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
9604 "the system does not have such limit."
9605 msgstr ""
9606 "静的な大きさのバッファを使うと、シンボリックリンクの内容を\n"
9607 "格納するのに十分な領域がない場合がある。\n"
9608 "バッファに必要なサイズは、そのシンボリックリンクに対して B<lstat>(2)\n"
9609 "の呼び出しで返される I<stat.st_size> の値から取得できる。\n"
9610 "ただし、 B<readlink>() が書き込んだバイト数をチェックして、\n"
9611 "シンボリックリンクのサイズが B<lstat>(2) と B<readlink>() の呼び出し\n"
9612 "の間で増えていないことを確認すべきである。\n"
9613 "B<readlink>() 用のバッファを動的に割り当てる方法でも、\n"
9614 "バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の\n"
9615 "問題を解決することができる。なぜなら、POSIX では、\n"
9616 "システムがそのような上限値を定義していない場合には、\n"
9617 "I<PATH_MAX> が定義されることが保証されていないからである。"
9618
9619 #. type: Plain text
9620 #: build/C/man2/readlink.2:161
9621 msgid ""
9622 "The following program allocates the buffer needed by B<readlink>()  "
9623 "dynamically from the information provided by B<lstat>(), making sure there's "
9624 "no race condition between the calls."
9625 msgstr ""
9626 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
9627 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
9628 "また、両方の呼び出し間で競合条件がないことを保証している。"
9629
9630 #. type: Plain text
9631 #: build/C/man2/readlink.2:168
9632 #, no-wrap
9633 msgid ""
9634 "#include E<lt>sys/types.hE<gt>\n"
9635 "#include E<lt>sys/stat.hE<gt>\n"
9636 "#include E<lt>stdio.hE<gt>\n"
9637 "#include E<lt>stdlib.hE<gt>\n"
9638 "#include E<lt>unistd.hE<gt>\n"
9639 msgstr ""
9640 "#include E<lt>sys/types.hE<gt>\n"
9641 "#include E<lt>sys/stat.hE<gt>\n"
9642 "#include E<lt>stdio.hE<gt>\n"
9643 "#include E<lt>stdlib.hE<gt>\n"
9644 "#include E<lt>unistd.hE<gt>\n"
9645
9646 #. type: Plain text
9647 #: build/C/man2/readlink.2:175
9648 #, no-wrap
9649 msgid ""
9650 "int\n"
9651 "main(int argc, char *argv[])\n"
9652 "{\n"
9653 "    struct stat sb;\n"
9654 "    char *linkname;\n"
9655 "    ssize_t r;\n"
9656 msgstr ""
9657 "int\n"
9658 "main(int argc, char *argv[])\n"
9659 "{\n"
9660 "    struct stat sb;\n"
9661 "    char *linkname;\n"
9662 "    ssize_t r;\n"
9663
9664 #. type: Plain text
9665 #: build/C/man2/readlink.2:180
9666 #, no-wrap
9667 msgid ""
9668 "    if (argc != 2) {\n"
9669 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9670 "        exit(EXIT_FAILURE);\n"
9671 "    }\n"
9672 msgstr ""
9673 "    if (argc != 2) {\n"
9674 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
9675 "        exit(EXIT_FAILURE);\n"
9676 "    }\n"
9677
9678 #. type: Plain text
9679 #: build/C/man2/readlink.2:185
9680 #, no-wrap
9681 msgid ""
9682 "    if (lstat(argv[1], &sb) == -1) {\n"
9683 "        perror(\"lstat\");\n"
9684 "        exit(EXIT_FAILURE);\n"
9685 "    }\n"
9686 msgstr ""
9687 "    if (lstat(argv[1], &sb) == -1) {\n"
9688 "        perror(\"lstat\");\n"
9689 "        exit(EXIT_FAILURE);\n"
9690 "    }\n"
9691
9692 #. type: Plain text
9693 #: build/C/man2/readlink.2:191
9694 #, no-wrap
9695 msgid ""
9696 "    linkname = malloc(sb.st_size + 1);\n"
9697 "    if (linkname == NULL) {\n"
9698 "        fprintf(stderr, \"insufficient memory\\en\");\n"
9699 "        exit(EXIT_FAILURE);\n"
9700 "    }\n"
9701 msgstr ""
9702 "    linkname = malloc(sb.st_size + 1);\n"
9703 "    if (linkname == NULL) {\n"
9704 "        fprintf(stderr, \"insufficient memory\\en\");\n"
9705 "        exit(EXIT_FAILURE);\n"
9706 "    }\n"
9707
9708 #. type: Plain text
9709 #: build/C/man2/readlink.2:193
9710 #, no-wrap
9711 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
9712 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
9713
9714 #. type: Plain text
9715 #: build/C/man2/readlink.2:198
9716 #, no-wrap
9717 msgid ""
9718 "    if (r E<lt> 0) {\n"
9719 "        perror(\"lstat\");\n"
9720 "        exit(EXIT_FAILURE);\n"
9721 "    }\n"
9722 msgstr ""
9723 "    if (r E<lt> 0) {\n"
9724 "        perror(\"lstat\");\n"
9725 "        exit(EXIT_FAILURE);\n"
9726 "    }\n"
9727
9728 #. type: Plain text
9729 #: build/C/man2/readlink.2:204
9730 #, no-wrap
9731 msgid ""
9732 "    if (r E<gt> sb.st_size) {\n"
9733 "        fprintf(stderr, \"symlink increased in size \"\n"
9734 "                        \"between lstat() and readlink()\\en\");\n"
9735 "        exit(EXIT_FAILURE);\n"
9736 "    }\n"
9737 msgstr ""
9738 "    if (r E<gt> sb.st_size) {\n"
9739 "        fprintf(stderr, \"symlink increased in size \"\n"
9740 "                        \"between lstat() and readlink()\\en\");\n"
9741 "        exit(EXIT_FAILURE);\n"
9742 "    }\n"
9743
9744 #. type: Plain text
9745 #: build/C/man2/readlink.2:206
9746 #, no-wrap
9747 msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
9748 msgstr "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
9749
9750 #. type: Plain text
9751 #: build/C/man2/readlink.2:208
9752 #, no-wrap
9753 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
9754 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
9755
9756 #. type: Plain text
9757 #: build/C/man2/readlink.2:220
9758 msgid ""
9759 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
9760 "B<path_resolution>(7), B<symlink>(7)"
9761 msgstr ""
9762 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2),\n"
9763 "B<path_resolution>(7), B<symlink>(7)"
9764
9765 #. type: TH
9766 #: build/C/man2/readv.2:30
9767 #, no-wrap
9768 msgid "READV"
9769 msgstr "READV"
9770
9771 #. type: TH
9772 #: build/C/man2/readv.2:30
9773 #, no-wrap
9774 msgid "2010-11-17"
9775 msgstr "2010-11-17"
9776
9777 #. type: Plain text
9778 #: build/C/man2/readv.2:33
9779 msgid ""
9780 "readv, writev, preadv, pwritev - read or write data into multiple buffers"
9781 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
9782
9783 #. type: Plain text
9784 #: build/C/man2/readv.2:36 build/C/man2/process_vm_readv.2:33
9785 #, no-wrap
9786 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
9787 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
9788
9789 #. type: Plain text
9790 #: build/C/man2/readv.2:38
9791 #, no-wrap
9792 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9793 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9794
9795 #. type: Plain text
9796 #: build/C/man2/readv.2:40
9797 #, no-wrap
9798 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9799 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9800
9801 #. type: Plain text
9802 #: build/C/man2/readv.2:43
9803 #, no-wrap
9804 msgid ""
9805 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9806 "B<               off_t >I<offset>B<);>\n"
9807 msgstr ""
9808 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9809 "B<               off_t >I<offset>B<);>\n"
9810
9811 #. type: Plain text
9812 #: build/C/man2/readv.2:46
9813 #, no-wrap
9814 msgid ""
9815 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9816 "B<                off_t >I<offset>B<);>\n"
9817 msgstr ""
9818 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9819 "B<                off_t >I<offset>B<);>\n"
9820
9821 #. type: Plain text
9822 #: build/C/man2/readv.2:56
9823 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
9824 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
9825
9826 #. type: Plain text
9827 #: build/C/man2/readv.2:66
9828 msgid ""
9829 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
9830 "with the file descriptor I<fd> into the buffers described by I<iov> "
9831 "(\"scatter input\")."
9832 msgstr ""
9833 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
9834 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
9835 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
9836
9837 #. type: Plain text
9838 #: build/C/man2/readv.2:76
9839 msgid ""
9840 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
9841 "I<iov> to the file associated with the file descriptor I<fd> (\"gather output"
9842 "\")."
9843 msgstr ""
9844 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 "
9845 "I<iovcnt>\n"
9846 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付け"
9847 "ら\n"
9848 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
9849
9850 #. type: Plain text
9851 #: build/C/man2/readv.2:85
9852 msgid ""
9853 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
9854 "I<E<lt>sys/uio.hE<gt>> as:"
9855 msgstr ""
9856 "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体"
9857 "は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
9858
9859 #. type: Plain text
9860 #: build/C/man2/readv.2:93 build/C/man2/process_vm_readv.2:111
9861 #, no-wrap
9862 msgid ""
9863 "struct iovec {\n"
9864 "    void  *iov_base;    /* Starting address */\n"
9865 "    size_t iov_len;     /* Number of bytes to transfer */\n"
9866 "};\n"
9867 msgstr ""
9868 "struct iovec {\n"
9869 "    void  *iov_base;    /* Starting address */\n"
9870 "    size_t iov_len;     /* Number of bytes to transfer */\n"
9871 "};\n"
9872
9873 #. type: Plain text
9874 #: build/C/man2/readv.2:101
9875 msgid ""
9876 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
9877 "buffers are filled."
9878 msgstr ""
9879 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
9880 "B<read>(2) と全く同様の動作を行う。"
9881
9882 #. type: Plain text
9883 #: build/C/man2/readv.2:107
9884 msgid ""
9885 "The B<writev>()  system call works just like B<write>(2)  except that "
9886 "multiple buffers are written out."
9887 msgstr ""
9888 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
9889 "B<write>(2) と全く同様の動作を行う。"
9890
9891 #. type: Plain text
9892 #: build/C/man2/readv.2:126
9893 msgid ""
9894 "Buffers are processed in array order.  This means that B<readv>()  "
9895 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
9896 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
9897 "filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>"
9898 "[0] before proceeding to I<iov>[1], and so on."
9899 msgstr ""
9900 "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に"
9901 "一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データ"
9902 "が十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 "
9903 "B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
9904
9905 #. type: Plain text
9906 #: build/C/man2/readv.2:144
9907 msgid ""
9908 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
9909 "data written by B<writev>()  is written as a single block that is not "
9910 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
9911 "for an exception); analogously, B<readv>()  is guaranteed to read a "
9912 "contiguous block of data from the file, regardless of read operations "
9913 "performed in other threads or processes that have file descriptors referring "
9914 "to the same open file description (see B<open>(2))."
9915 msgstr ""
9916 "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 "
9917 "B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセス"
9918 "の write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を"
9919 "参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み"
9920 "出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を"
9921 "参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操"
9922 "作の影響を受けることはない。"
9923
9924 #. type: SS
9925 #: build/C/man2/readv.2:144
9926 #, no-wrap
9927 msgid "preadv() and pwritev()"
9928 msgstr "preadv() と pwritev()"
9929
9930 #. type: Plain text
9931 #: build/C/man2/readv.2:157
9932 msgid ""
9933 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
9934 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
9935 "argument, I<offset>, which specifies the file offset at which the input "
9936 "operation is to be performed."
9937 msgstr ""
9938 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
9939 "組み合わせたものである。\n"
9940 "B<readv>() と同じ処理を実行するが、\n"
9941 "4 番目の引き数 I<offset> が追加されており、\n"
9942 "この引き数は入力操作を行うファイルオフセットを指定する。"
9943
9944 #. type: Plain text
9945 #: build/C/man2/readv.2:170
9946 msgid ""
9947 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
9948 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
9949 "argument, I<offset>, which specifies the file offset at which the output "
9950 "operation is to be performed."
9951 msgstr ""
9952 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
9953 "組み合わせたものである。\n"
9954 "B<writev>() と同じ処理を実行するが、\n"
9955 "4 番目の引き数 I<offset> が追加されており、\n"
9956 "この引き数は出力操作を行うファイルオフセットを指定する。"
9957
9958 #. type: Plain text
9959 #: build/C/man2/readv.2:175
9960 msgid ""
9961 "The file offset is not changed by these system calls.  The file referred to "
9962 "by I<fd> must be capable of seeking."
9963 msgstr ""
9964 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
9965 "I<fd> が参照するファイルは seek 可能でなければならない。"
9966
9967 #. type: Plain text
9968 #: build/C/man2/readv.2:186
9969 msgid ""
9970 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
9971 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
9972 "error, -1 is returned, and I<errno> is set appropriately."
9973 msgstr ""
9974 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
9975 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
9976 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
9977
9978 #. type: Plain text
9979 #: build/C/man2/readv.2:198
9980 msgid ""
9981 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
9982 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>"
9983 "(2).  Additionally, the following error is defined:"
9984 msgstr ""
9985 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
9986 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗す"
9987 "る。\n"
9988 "また、追加で以下のエラーが定義されている:"
9989
9990 #. type: Plain text
9991 #: build/C/man2/readv.2:207
9992 msgid ""
9993 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
9994 "vector count I<iovcnt> is less than zero or greater than the permitted "
9995 "maximum."
9996 msgstr ""
9997 "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。もしくは、 ベクタ"
9998 "数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
9999
10000 #. type: Plain text
10001 #: build/C/man2/readv.2:212
10002 msgid ""
10003 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
10004 "support was added in glibc 2.10."
10005 msgstr ""
10006 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
10007 "ライブラリによるサポートは glibc 2.10 で追加された。"
10008
10009 #.  The readv/writev system calls were buggy before Linux 1.3.40.
10010 #.  (Says release.libc.)
10011 #. type: Plain text
10012 #: build/C/man2/readv.2:220
10013 msgid ""
10014 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
10015 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
10016 "I<iovcnt> argument, and I<int> as the return type."
10017 msgstr ""
10018 "B<readv>(), B<writev>(): \n"
10019 "4.4BSD (これらのシステムコールは 4.2BSD で最初に現われた)、POSIX.1-2001。 \n"
10020 "Linux libc5 では、 I<iovcnt> 引き数の型として I<size_t> を、\n"
10021 "返り値の型として I<int> を使用していた。"
10022
10023 #. type: Plain text
10024 #: build/C/man2/readv.2:224
10025 msgid ""
10026 "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
10027 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
10028
10029 #. type: SS
10030 #: build/C/man2/readv.2:225
10031 #, no-wrap
10032 msgid "Linux Notes"
10033 msgstr "Linux での注意"
10034
10035 #. type: Plain text
10036 #: build/C/man2/readv.2:256
10037 msgid ""
10038 "POSIX.1-2001 allows an implementation to place a limit on the number of "
10039 "items that can be passed in I<iov>.  An implementation can advertise its "
10040 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
10041 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
10042 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
10043 "glibc wrapper functions do some extra work if they detect that the "
10044 "underlying kernel system call failed because this limit was exceeded.  In "
10045 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
10046 "large enough for all of the items specified by I<iov>, passes that buffer in "
10047 "a call to B<read>(2), copies data from the buffer to the locations specified "
10048 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
10049 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
10050 "using a temporary buffer and a call to B<write>(2)."
10051 msgstr ""
10052 "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認めら"
10053 "れている。 実装は、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、実"
10054 "行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で、この上限を広告することができ"
10055 "る。 Linux では、この仕組みにより広告される上限は 1024 であり、 この値はカー"
10056 "ネルでの上限そのものである。 一方で、glibc のラッパー関数は、その関数の内部で"
10057 "呼ばれるカーネル システムコールがこの上限を超過して失敗したことを検出する"
10058 "と、 追加の動作をする。 B<readv>()  の場合、ラッパー関数は I<iov> で指定され"
10059 "た全ての要素を格納できる大きさの一時バッファを割り当て、 B<read>(2)  を呼び出"
10060 "す際にそのバッファを渡し、 そのバッファのデータを I<iov> の各要素の "
10061 "I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファを解放す"
10062 "る。 B<writev>()  のラッパー関数も、同じように一時バッファを使って B<write>"
10063 "(2)  を呼び出す。"
10064
10065 #. type: Plain text
10066 #: build/C/man2/readv.2:263
10067 msgid ""
10068 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
10069 "operate on file descriptors, with the functions from the stdio library; the "
10070 "results will be undefined and probably not what you want."
10071 msgstr ""
10072 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
10073 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
10074 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
10075 "得られないだろう。"
10076
10077 #. type: Plain text
10078 #: build/C/man2/readv.2:266
10079 msgid "The following code sample demonstrates the use of B<writev>():"
10080 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
10081
10082 #. type: Plain text
10083 #: build/C/man2/readv.2:273
10084 #, no-wrap
10085 msgid ""
10086 "char *str0 = \"hello \";\n"
10087 "char *str1 = \"world\\en\";\n"
10088 "struct iovec iov[2];\n"
10089 "ssize_t nwritten;\n"
10090 msgstr ""
10091 "char *str0 = \"hello \";\n"
10092 "char *str1 = \"world\\en\";\n"
10093 "struct iovec iov[2];\n"
10094 "ssize_t nwritten;\n"
10095
10096 #. type: Plain text
10097 #: build/C/man2/readv.2:278
10098 #, no-wrap
10099 msgid ""
10100 "iov[0].iov_base = str0;\n"
10101 "iov[0].iov_len = strlen(str0);\n"
10102 "iov[1].iov_base = str1;\n"
10103 "iov[1].iov_len = strlen(str1);\n"
10104 msgstr ""
10105 "iov[0].iov_base = str0;\n"
10106 "iov[0].iov_len = strlen(str0);\n"
10107 "iov[1].iov_base = str1;\n"
10108 "iov[1].iov_len = strlen(str1);\n"
10109
10110 #. type: Plain text
10111 #: build/C/man2/readv.2:280
10112 #, no-wrap
10113 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10114 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
10115
10116 #. type: Plain text
10117 #: build/C/man2/readv.2:286
10118 msgid "B<pread>(2), B<read>(2), B<write>(2)"
10119 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
10120
10121 #. type: TH
10122 #: build/C/man3/remove.3:31
10123 #, no-wrap
10124 msgid "REMOVE"
10125 msgstr "REMOVE"
10126
10127 #. type: TH
10128 #: build/C/man3/remove.3:31
10129 #, no-wrap
10130 msgid "2008-12-03"
10131 msgstr "2008-12-03"
10132
10133 #. type: Plain text
10134 #: build/C/man3/remove.3:34
10135 msgid "remove - remove a file or directory"
10136 msgstr "remove - ファイルやディレクトリを削除する"
10137
10138 #. type: Plain text
10139 #: build/C/man3/remove.3:38
10140 msgid "B<int remove(const char *>I<pathname>B<);>"
10141 msgstr "B<int remove(const char *>I<pathname>B<);>"
10142
10143 #. type: Plain text
10144 #: build/C/man3/remove.3:46
10145 msgid ""
10146 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
10147 "for files, and B<rmdir>(2)  for directories."
10148 msgstr ""
10149 "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては "
10150 "B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
10151
10152 #. type: Plain text
10153 #: build/C/man3/remove.3:50
10154 msgid ""
10155 "If the removed name was the last link to a file and no processes have the "
10156 "file open, the file is deleted and the space it was using is made available "
10157 "for reuse."
10158 msgstr ""
10159 "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイル"
10160 "を 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使う"
10161 "ことができるようになる。"
10162
10163 #. type: Plain text
10164 #: build/C/man3/remove.3:55
10165 msgid ""
10166 "If the name was the last link to a file, but any processes still have the "
10167 "file open, the file will remain in existence until the last file descriptor "
10168 "referring to it is closed."
10169 msgstr ""
10170 "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開"
10171 "いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるま"
10172 "でファイルは存在し続ける。"
10173
10174 #. type: Plain text
10175 #: build/C/man3/remove.3:57
10176 msgid "If the name referred to a symbolic link, the link is removed."
10177 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
10178
10179 #. type: Plain text
10180 #: build/C/man3/remove.3:60
10181 msgid ""
10182 "If the name referred to a socket, FIFO, or device, the name is removed, but "
10183 "processes which have the object open may continue to use it."
10184 msgstr ""
10185 "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 その"
10186 "ソケットなどを開いているプロセスはそのまま使い続けることができる。"
10187
10188 #. type: Plain text
10189 #: build/C/man3/remove.3:70
10190 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
10191 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
10192
10193 #. type: Plain text
10194 #: build/C/man3/remove.3:72
10195 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
10196 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
10197
10198 #. type: Plain text
10199 #: build/C/man3/remove.3:78
10200 msgid ""
10201 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
10202 "hence would not remove directories)."
10203 msgstr ""
10204 "libc4 と libc5 においては、 B<remove>()  は B<unlink>(2)  の別名であった "
10205 "(従ってディレクトリを削除できなかった)。"
10206
10207 #. type: Plain text
10208 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
10209 msgid ""
10210 "Infelicities in the protocol underlying NFS can cause the unexpected "
10211 "disappearance of files which are still being used."
10212 msgstr ""
10213 "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしま"
10214 "うことがありえる。"
10215
10216 #. type: Plain text
10217 #: build/C/man3/remove.3:92
10218 msgid ""
10219 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10220 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10221 msgstr ""
10222 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
10223 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
10224
10225 #. type: TH
10226 #: build/C/man2/rename.2:32
10227 #, no-wrap
10228 msgid "RENAME"
10229 msgstr "RENAME"
10230
10231 #. type: TH
10232 #: build/C/man2/rename.2:32
10233 #, no-wrap
10234 msgid "2009-03-30"
10235 msgstr "2009-03-30"
10236
10237 #. type: Plain text
10238 #: build/C/man2/rename.2:35
10239 msgid "rename - change the name or location of a file"
10240 msgstr "rename - ファイルの名前や位置を変更する"
10241
10242 #. type: Plain text
10243 #: build/C/man2/rename.2:39
10244 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10245 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10246
10247 #. type: Plain text
10248 #: build/C/man2/rename.2:48
10249 msgid ""
10250 "B<rename>()  renames a file, moving it between directories if required.  Any "
10251 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
10252 "Open file descriptors for I<oldpath> are also unaffected."
10253 msgstr ""
10254 "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行な"
10255 "う。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク "
10256 "(hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスク"
10257 "リプタにも影響はない。"
10258
10259 #. type: Plain text
10260 #: build/C/man2/rename.2:56
10261 msgid ""
10262 "If I<newpath> already exists it will be atomically replaced (subject to a "
10263 "few conditions; see ERRORS below), so that there is no point at which "
10264 "another process attempting to access I<newpath> will find it missing."
10265 msgstr ""
10266 "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられ"
10267 "る (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 その"
10268 "ため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うこ"
10269 "とはない (訳註: 常にアクセス可能である)。"
10270
10271 #. type: Plain text
10272 #: build/C/man2/rename.2:64
10273 msgid ""
10274 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
10275 "file, then B<rename>()  does nothing, and returns a success status."
10276 msgstr ""
10277 "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照し"
10278 "ている場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
10279
10280 #. type: Plain text
10281 #: build/C/man2/rename.2:72
10282 msgid ""
10283 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
10284 "guarantees to leave an instance of I<newpath> in place."
10285 msgstr ""
10286 "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は "
10287 "I<newpath> の実体を元のまま残すことを保証する。"
10288
10289 #. type: Plain text
10290 #: build/C/man2/rename.2:78
10291 msgid ""
10292 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
10293 "not exist, or it must specify an empty directory."
10294 msgstr ""
10295 "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は"
10296 "存在しないか、空のディレクトリでなければならない。"
10297
10298 #. type: Plain text
10299 #: build/C/man2/rename.2:85
10300 msgid ""
10301 "However, when overwriting there will probably be a window in which both "
10302 "I<oldpath> and I<newpath> refer to the file being renamed."
10303 msgstr ""
10304 "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と "
10305 "I<newpath> の両方で参照できる瞬間がおそらく存在する。"
10306
10307 #. type: Plain text
10308 #: build/C/man2/rename.2:91
10309 msgid ""
10310 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
10311 "refers to a symbolic link the link will be overwritten."
10312 msgstr ""
10313 "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンク"
10314 "の名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合"
10315 "は、リンクが上書きされる。"
10316
10317 #. type: Plain text
10318 #: build/C/man2/rename.2:116
10319 msgid ""
10320 "Write permission is denied for the directory containing I<oldpath> or "
10321 "I<newpath>, or, search permission is denied for one of the directories in "
10322 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
10323 "and does not allow write permission (needed to update the I<..> entry).  "
10324 "(See also B<path_resolution>(7).)"
10325 msgstr ""
10326 "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 "
10327 "または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可が"
10328 "ない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要"
10329 "な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
10330
10331 #. type: TP
10332 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
10333 #, no-wrap
10334 msgid "B<EBUSY>"
10335 msgstr "B<EBUSY>"
10336
10337 #. type: Plain text
10338 #: build/C/man2/rename.2:133
10339 msgid ""
10340 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
10341 "use by some process (perhaps as current working directory, or as root "
10342 "directory, or because it was open for reading) or is in use by the system "
10343 "(for example as mount point), while the system considers this an error.  "
10344 "(Note that there is no requirement to return B<EBUSY> in such cases"
10345 "\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
10346 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
10347 "situations.)"
10348 msgstr ""
10349 "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多"
10350 "分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのために"
10351 "オープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイン"
10352 "トである)  であり、システムがこれをエラーであると判断したために rename が失敗"
10353 "した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注"
10354 "意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もな"
10355 "い。 ただし、そのような状況で、システムが他に返すエラーがない場合には "
10356 "B<EBUSY> を返すことが許されている。)"
10357
10358 #. type: Plain text
10359 #: build/C/man2/rename.2:140
10360 msgid ""
10361 "The new pathname contained a path prefix of the old, or, more generally, an "
10362 "attempt was made to make a directory a subdirectory of itself."
10363 msgstr ""
10364 "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブ"
10365 "ディレクトリに 変更しようとした場合がほとんどである。"
10366
10367 #. type: Plain text
10368 #: build/C/man2/rename.2:146
10369 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
10370 msgstr ""
10371 "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでな"
10372 "い。"
10373
10374 #. type: Plain text
10375 #: build/C/man2/rename.2:157
10376 msgid ""
10377 "I<oldpath> already has the maximum number of links to it, or it was a "
10378 "directory and the directory containing I<newpath> has the maximum number of "
10379 "links."
10380 msgstr ""
10381 "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで "
10382 "I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
10383
10384 #. type: Plain text
10385 #: build/C/man2/rename.2:173
10386 msgid ""
10387 "The link named by I<oldpath> does not exist; or, a directory component in "
10388 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
10389 msgstr ""
10390 "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレ"
10391 "クトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
10392
10393 #. type: Plain text
10394 #: build/C/man2/rename.2:190
10395 msgid ""
10396 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
10397 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
10398 "not a directory."
10399 msgstr ""
10400 "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクト"
10401 "リでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレク"
10402 "トリでない。"
10403
10404 #. type: TP
10405 #: build/C/man2/rename.2:190
10406 #, no-wrap
10407 msgid "B<ENOTEMPTY> or B<EEXIST>"
10408 msgstr "B<ENOTEMPTY  または  EEXIST>"
10409
10410 #. type: Plain text
10411 #: build/C/man2/rename.2:194
10412 msgid ""
10413 "I<newpath> is a nonempty directory, that is, contains entries other than \"."
10414 "\" and \"..\"."
10415 msgstr ""
10416 "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含ん"
10417 "でいる。"
10418
10419 #. type: TP
10420 #: build/C/man2/rename.2:194 build/C/man2/unlink.2:126
10421 #, no-wrap
10422 msgid "B<EPERM> or B<EACCES>"
10423 msgstr "B<EPERM> または B<EACCES>"
10424
10425 #. type: Plain text
10426 #: build/C/man2/rename.2:218
10427 msgid ""
10428 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
10429 "the process's effective user ID is neither the user ID of the file to be "
10430 "deleted nor that of the directory containing it, and the process is not "
10431 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
10432 "I<newpath> is an existing file and the directory containing it has the "
10433 "sticky bit set and the process's effective user ID is neither the user ID of "
10434 "the file to be replaced nor that of the directory containing it, and the "
10435 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
10436 "capability); or the file system containing I<pathname> does not support "
10437 "renaming of the type requested."
10438 msgstr ""
10439 "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  "
10440 "(B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとす"
10441 "るファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいず"
10442 "れとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビ"
10443 "リティ (capability) がない)。 または、 I<newpath> がすでに存在するファイル"
10444 "で、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユー"
10445 "ザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディ"
10446 "レクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux "
10447 "では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が"
10448 "存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
10449
10450 #. type: Plain text
10451 #: build/C/man2/rename.2:229
10452 msgid ""
10453 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
10454 "permits a file system to be mounted at multiple points, but B<rename>()  "
10455 "does not work across different mount points, even if the same file system is "
10456 "mounted on both.)"
10457 msgstr ""
10458 "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 "
10459 "(Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可"
10460 "している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 "
10461 "別々のマウント位置を跨いでは動作しない。)"
10462
10463 #. type: Plain text
10464 #: build/C/man2/rename.2:231
10465 msgid "4.3BSD, C89, C99, POSIX.1-2001."
10466 msgstr "4.3BSD, C89, C99, POSIX.1-2001."
10467
10468 #. type: Plain text
10469 #: build/C/man2/rename.2:242
10470 msgid ""
10471 "On NFS file systems, you can not assume that if the operation failed the "
10472 "file was not renamed.  If the server does the rename operation and then "
10473 "crashes, the retransmitted RPC which will be processed when the server is up "
10474 "again causes a failure.  The application is expected to deal with this.  See "
10475 "B<link>(2)  for a similar problem."
10476 msgstr ""
10477 "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更で"
10478 "きなかったと決めてかかることはできない。 サーバが rename 操作を終えてからク"
10479 "ラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理さ"
10480 "れるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期"
10481 "待されている。 同様の問題について B<link>(2)  にも書かれている。"
10482
10483 #. type: Plain text
10484 #: build/C/man2/rename.2:251
10485 msgid ""
10486 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10487 "(2), B<path_resolution>(7), B<symlink>(7)"
10488 msgstr ""
10489 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), B<unlink>"
10490 "(2), B<path_resolution>(7), B<symlink>(7)"
10491
10492 #. type: TH
10493 #: build/C/man2/rmdir.2:30
10494 #, no-wrap
10495 msgid "RMDIR"
10496 msgstr "RMDIR"
10497
10498 #. type: TH
10499 #: build/C/man2/rmdir.2:30
10500 #, no-wrap
10501 msgid "2008-05-08"
10502 msgstr "2008-05-08"
10503
10504 #. type: Plain text
10505 #: build/C/man2/rmdir.2:33
10506 msgid "rmdir - delete a directory"
10507 msgstr "rmdir - ディレクトリを削除する"
10508
10509 #. type: Plain text
10510 #: build/C/man2/rmdir.2:37
10511 msgid "B<int rmdir(const char *>I<pathname>B<);>"
10512 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
10513
10514 #. type: Plain text
10515 #: build/C/man2/rmdir.2:40
10516 msgid "B<rmdir>()  deletes a directory, which must be empty."
10517 msgstr ""
10518 "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければなら"
10519 "ない。"
10520
10521 #. type: Plain text
10522 #: build/C/man2/rmdir.2:55
10523 msgid ""
10524 "Write access to the directory containing I<pathname> was not allowed, or one "
10525 "of the directories in the path prefix of I<pathname> did not allow search "
10526 "permission.  (See also B<path_resolution>(7)."
10527 msgstr ""
10528 "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 "
10529 "(effective) UID に対して許可されていないか、 I<pathname> に含まれているディレ"
10530 "クトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクト"
10531 "リのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこ"
10532 "と)"
10533
10534 #. type: Plain text
10535 #: build/C/man2/rmdir.2:64
10536 msgid ""
10537 "I<pathname> is currently in use by the system or some process that prevents "
10538 "its removal.  On Linux this means I<pathname> is currently used as a mount "
10539 "point or is the root directory of the calling process."
10540 msgstr ""
10541 "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 "
10542 "Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出し"
10543 "たプロセスのルートディレクトリであることを意味する。"
10544
10545 #. type: Plain text
10546 #: build/C/man2/rmdir.2:73
10547 msgid "I<pathname> has I<.> as last component."
10548 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
10549
10550 #. type: Plain text
10551 #: build/C/man2/rmdir.2:77
10552 msgid "Too many symbolic links were encountered in resolving I<pathname>."
10553 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
10554
10555 #. type: Plain text
10556 #: build/C/man2/rmdir.2:85
10557 msgid ""
10558 "A directory component in I<pathname> does not exist or is a dangling "
10559 "symbolic link."
10560 msgstr ""
10561 "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボ"
10562 "リックリンク (symbolic link) である。"
10563
10564 #. type: Plain text
10565 #: build/C/man2/rmdir.2:94
10566 msgid ""
10567 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
10568 "fact, a directory."
10569 msgstr ""
10570 "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレ"
10571 "クトリでない。"
10572
10573 #. type: TP
10574 #: build/C/man2/rmdir.2:94
10575 #, no-wrap
10576 msgid "B<ENOTEMPTY>"
10577 msgstr "B<ENOTEMPTY>"
10578
10579 #. type: Plain text
10580 #: build/C/man2/rmdir.2:107
10581 msgid ""
10582 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
10583 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
10584 "condition."
10585 msgstr ""
10586 "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 "
10587 "I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況"
10588 "で B<EEXIST> を返すことを認めている。"
10589
10590 #. type: Plain text
10591 #: build/C/man2/rmdir.2:118
10592 msgid ""
10593 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
10594 "and the process's effective user ID is neither the user ID of the file to be "
10595 "deleted nor that of the directory containing it, and the process is not "
10596 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
10597 msgstr ""
10598 "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  "
10599 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとする"
10600 "ファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも"
10601 "異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
10602
10603 #. type: Plain text
10604 #: build/C/man2/rmdir.2:123
10605 msgid ""
10606 "The file system containing I<pathname> does not support the removal of "
10607 "directories."
10608 msgstr ""
10609 "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしてい"
10610 "ない。"
10611
10612 #. type: Plain text
10613 #: build/C/man2/rmdir.2:127
10614 msgid "I<pathname> refers to a directory on a read-only file system."
10615 msgstr ""
10616 "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
10617
10618 #. type: Plain text
10619 #: build/C/man2/rmdir.2:132
10620 msgid ""
10621 "Infelicities in the protocol underlying NFS can cause the unexpected "
10622 "disappearance of directories which are still being used."
10623 msgstr ""
10624 "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅"
10625 "する現象が引き起こされることがある。"
10626
10627 #. type: Plain text
10628 #: build/C/man2/rmdir.2:141
10629 msgid ""
10630 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10631 "B<unlink>(2), B<unlinkat>(2)"
10632 msgstr ""
10633 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
10634 "B<unlink>(2), B<unlinkat>(2)"
10635
10636 #. type: TH
10637 #: build/C/man3/scanf.3:50
10638 #, no-wrap
10639 msgid "SCANF"
10640 msgstr "SCANF"
10641
10642 #. type: Plain text
10643 #: build/C/man3/scanf.3:53
10644 msgid ""
10645 "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
10646 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
10647
10648 #. type: Plain text
10649 #: build/C/man3/scanf.3:60
10650 #, no-wrap
10651 msgid ""
10652 "B<int scanf(const char *>I<format>B<, ...);>\n"
10653 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10654 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10655 msgstr ""
10656 "B<int scanf(const char *>I<format>B<, ...);>\n"
10657 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
10658 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
10659
10660 #. type: Plain text
10661 #: build/C/man3/scanf.3:62
10662 #, no-wrap
10663 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
10664 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
10665
10666 #. type: Plain text
10667 #: build/C/man3/scanf.3:66
10668 #, no-wrap
10669 msgid ""
10670 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10671 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10672 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10673 msgstr ""
10674 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
10675 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10676 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
10677
10678 #. type: Plain text
10679 #: build/C/man3/scanf.3:77
10680 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10681 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
10682
10683 #. type: Plain text
10684 #: build/C/man3/scanf.3:80
10685 msgid ""
10686 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
10687 "200112L;"
10688 msgstr ""
10689 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
10690 "200112L;"
10691
10692 #. type: Plain text
10693 #: build/C/man3/scanf.3:102
10694 msgid ""
10695 "The B<scanf>()  family of functions scans input according to I<format> as "
10696 "described below.  This format may contain I<conversion specifications>; the "
10697 "results from such conversions, if any, are stored in the locations pointed "
10698 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
10699 "argument must be of a type that is appropriate for the value returned by the "
10700 "corresponding conversion specification."
10701 msgstr ""
10702 "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み"
10703 "込むものである。 この書式には I<「変換指定」 (conversion specifications)> を"
10704 "含めることができ、変換指定があれば、その変換の結果は I<format> に続く "
10705 "I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型"
10706 "は、対応する変換指定が返す値に 適合していなければならない。"
10707
10708 #. type: Plain text
10709 #: build/C/man3/scanf.3:113
10710 msgid ""
10711 "If the number of conversion specifications in I<format> exceeds the number "
10712 "of I<pointer> arguments, the results are undefined.  If the number of "
10713 "I<pointer> arguments exceeds the number of conversion specifications, then "
10714 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
10715 msgstr ""
10716 "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は"
10717 "未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分"
10718 "な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
10719
10720 #. type: Plain text
10721 #: build/C/man3/scanf.3:125
10722 msgid ""
10723 "The B<scanf>()  function reads input from the standard input stream "
10724 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
10725 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
10726 msgstr ""
10727 "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 "
10728 "B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>"
10729 "()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
10730
10731 #. type: Plain text
10732 #: build/C/man3/scanf.3:143
10733 msgid ""
10734 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
10735 "from the stream pointer I<stream> using a variable argument list of pointers "
10736 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
10737 "from the standard input and the B<vsscanf>()  function scans it from a "
10738 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
10739 "functions respectively."
10740 msgstr ""
10741 "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> "
10742 "からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参"
10743 "照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取り"
10744 "を行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの"
10745 "関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
10746
10747 #. type: Plain text
10748 #: build/C/man3/scanf.3:157
10749 msgid ""
10750 "The I<format> string consists of a sequence of I<directives> which describe "
10751 "how to process the sequence of input characters.  If processing of a "
10752 "directive fails, no further input is read, and B<scanf>()  returns.  A "
10753 "\"failure\" can be either of the following: I<input failure>, meaning that "
10754 "input characters were unavailable, or I<matching failure>, meaning that the "
10755 "input was inappropriate (see below)."
10756 msgstr ""
10757 "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の"
10758 "系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、"
10759 "入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 "
10760 "(input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 "
10761 "入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切"
10762 "であったこと (下記参照) を意味する。"
10763
10764 #. type: Plain text
10765 #: build/C/man3/scanf.3:159
10766 msgid "A directive is one of the following:"
10767 msgstr "命令は以下のいずれかである:"
10768
10769 #. type: TP
10770 #: build/C/man3/scanf.3:159 build/C/man3/scanf.3:165 build/C/man3/scanf.3:169
10771 #: build/C/man3/scanf.3:188 build/C/man3/scanf.3:199 build/C/man3/scanf.3:217
10772 #: build/C/man3/scanf.3:229 build/C/man3/scanf.3:243
10773 #, no-wrap
10774 msgid "\\(bu"
10775 msgstr "\\(bu"
10776
10777 #. type: Plain text
10778 #: build/C/man3/scanf.3:165
10779 msgid ""
10780 "A sequence of white-space characters (space, tab, newline, etc.; see "
10781 "B<isspace>(3)).  This directive matches any amount of white space, including "
10782 "none, in the input."
10783 msgstr ""
10784 "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この"
10785 "命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一"
10786 "致する)。"
10787
10788 #. type: Plain text
10789 #: build/C/man3/scanf.3:169
10790 msgid ""
10791 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
10792 "This character must exactly match the next character of input."
10793 msgstr ""
10794 "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力"
10795 "の次の文字に正確に一致しなければならない。"
10796
10797 #. type: Plain text
10798 #: build/C/man3/scanf.3:180
10799 msgid ""
10800 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
10801 "character.  A sequence of characters from the input is converted according "
10802 "to this specification, and the result is placed in the corresponding "
10803 "I<pointer> argument.  If the next item of input does not match the "
10804 "conversion specification, the conversion fails\\(emthis is a I<matching "
10805 "failure>."
10806 msgstr ""
10807 "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の"
10808 "系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指"
10809 "す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗す"
10810 "る \\(emこれが I<「一致の失敗」 (matching failure)> である。"
10811
10812 #. type: Plain text
10813 #: build/C/man3/scanf.3:188
10814 msgid ""
10815 "Each I<conversion specification> in I<format> begins with either the "
10816 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
10817 "for the distinction) followed by:"
10818 msgstr ""
10819 "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<"
10820 "%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
10821
10822 #. type: Plain text
10823 #: build/C/man3/scanf.3:199
10824 msgid ""
10825 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
10826 "input as directed by the conversion specification, but discards the input.  "
10827 "No corresponding I<pointer> argument is required, and this specification is "
10828 "not included in the count of successful assignments returned by B<scanf>()."
10829 msgstr ""
10830 "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り"
10831 "入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要な"
10832 "く、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
10833
10834 #. type: Plain text
10835 #: build/C/man3/scanf.3:217
10836 msgid ""
10837 "An optional \\(aqa\\(aq character.  This is used with string conversions, "
10838 "and relieves the caller of the need to allocate a corresponding buffer to "
10839 "hold the input: instead, B<scanf>()  allocates a buffer of sufficient size, "
10840 "and assigns the address of this buffer to the corresponding I<pointer> "
10841 "argument, which should be a pointer to a I<char *> variable (this variable "
10842 "does not need to be initialized before the call).  The caller should "
10843 "subsequently B<free>(3)  this buffer when it is no longer required.  This is "
10844 "a GNU extension; C99 employs the \\(aqa\\(aq character as a conversion "
10845 "specifier (and it can also be used as such in the GNU implementation)."
10846 msgstr ""
10847 "文字 \\(aqa\\(aq (省略可能)。これは文字列変換とともに使用され、これを使うと "
10848 "呼び出し元が入力を保持する対応するバッファを確保する必要がなくなる。 代わり"
10849 "に B<scanf>()  が必要な大きさのバッファを確保し、このバッファのアドレスを 対"
10850 "応する I<pointer> 引き数に代入する。 I<pointer> 引き数は I<char *> 型の変数へ"
10851 "のポインタでなければならない (変数自体は呼び出し前に初期化されている必要はな"
10852 "い)。 呼び出し元は、不要になった時点で、このバッファを B<free>(3)  すべきであ"
10853 "る。この機能は GNU による拡張である。 C99 は \\(aqa\\(aq 文字を変換指定として"
10854 "使用している (こちらも GNU の実装と同じように使用することができる)。"
10855
10856 #. type: Plain text
10857 #: build/C/man3/scanf.3:229
10858 msgid ""
10859 "An optional decimal integer which specifies the I<maximum field width>.  "
10860 "Reading of characters stops either when this maximum is reached or when a "
10861 "nonmatching character is found, whichever happens first.  Most conversions "
10862 "discard initial white space characters (the exceptions are noted below), and "
10863 "these discarded characters don't count toward the maximum field width.  "
10864 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
10865 "mark the end of the input; the maximum field width does not include this "
10866 "terminator."
10867 msgstr ""
10868 "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、"
10869 "一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 "
10870 "ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述"
10871 "する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列"
10872 "の入力変換では、入力の末尾を示す終端の NULL バイト (\\(aq\\e0\\(aq)  も格納さ"
10873 "れるが、最大フィールド幅にはこの終端バイトは含まれない。"
10874
10875 #. type: Plain text
10876 #: build/C/man3/scanf.3:243
10877 msgid ""
10878 "An optional I<type modifier character>.  For example, the B<l> type modifier "
10879 "is used with integer conversions such as B<%d> to specify that the "
10880 "corresponding I<pointer> argument refers to a I<long int> rather than a "
10881 "pointer to an I<int>."
10882 msgstr ""
10883 "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 "
10884 "B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が "
10885 "I<int> ではなく I<long int> を参照していることを指定できる。"
10886
10887 #. type: Plain text
10888 #: build/C/man3/scanf.3:248
10889 msgid ""
10890 "A I<conversion specifier> that specifies the type of input conversion to be "
10891 "performed."
10892 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
10893
10894 #. type: Plain text
10895 #: build/C/man3/scanf.3:277
10896 msgid ""
10897 "The conversion specifications in I<format> are of two forms, either "
10898 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
10899 "forms should not be mixed in the same I<format> string, except that a string "
10900 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
10901 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
10902 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
10903 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
10904 "specifies that the converted input should be placed in the location referred "
10905 "to by the I<n>-th I<pointer> argument following I<format>."
10906 msgstr ""
10907 "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まる"
10908 "かの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜる"
10909 "ことはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含め"
10910 "ることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の "
10911 "\\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<"
10912 "%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 "
10913 "I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の "
10914 "I<pointer> 引き数が参照する場所に格納することを指定する。"
10915
10916 #. type: SS
10917 #: build/C/man3/scanf.3:277
10918 #, no-wrap
10919 msgid "Conversions"
10920 msgstr "変換"
10921
10922 #. type: Plain text
10923 #: build/C/man3/scanf.3:281
10924 msgid ""
10925 "The following I<type modifier characters> can appear in a conversion "
10926 "specification:"
10927 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
10928
10929 #. type: Plain text
10930 #: build/C/man3/scanf.3:291
10931 msgid ""
10932 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
10933 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
10934 "I<unsigned short int> (rather than I<int>)."
10935 msgstr ""
10936 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポイン"
10937 "タが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタで"
10938 "あることを示す。"
10939
10940 #. type: Plain text
10941 #: build/C/man3/scanf.3:299
10942 msgid ""
10943 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
10944 "I<unsigned char>."
10945 msgstr ""
10946 "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポイン"
10947 "タであることを示す。"
10948
10949 #. type: Plain text
10950 #: build/C/man3/scanf.3:308
10951 msgid ""
10952 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
10953 "I<uintmax_t>.  This modifier was introduced in C99."
10954 msgstr ""
10955 "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであ"
10956 "ることを示す。 この修飾子は C99 で導入された。"
10957
10958 #.  This use of l was introduced in Amendment 1 to ISO C90.
10959 #. type: Plain text
10960 #: build/C/man3/scanf.3:335
10961 msgid ""
10962 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
10963 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
10964 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
10965 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
10966 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
10967 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
10968 "as a pointer to a wide character or wide-character string respectively."
10969 msgstr ""
10970 "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次の"
10971 "ポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポイン"
10972 "タであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポイン"
10973 "タが (I<float> ではなく)  I<double> へのポインタであることのいずれかであるこ"
10974 "とを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<"
10975 "%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポイ"
10976 "ンタであると みなされる。"
10977
10978 #.  MTK, Jul 05: The following is no longer true for modern
10979 #.  ANSI C (i.e., C99):
10980 #.  (Note that long long is not an
10981 #.  ANSI C
10982 #.  type. Any program using this will not be portable to all
10983 #.  architectures).
10984 #. type: Plain text
10985 #: build/C/man3/scanf.3:351
10986 msgid ""
10987 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
10988 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
10989 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
10990 msgstr ""
10991 "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであること"
10992 "を示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが "
10993 "I<long long> へのポインタであることのいずれかであることを示す。"
10994
10995 #. type: Plain text
10996 #: build/C/man3/scanf.3:356
10997 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
10998 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
10999
11000 #. type: Plain text
11001 #: build/C/man3/scanf.3:363
11002 msgid ""
11003 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
11004 "modifier was introduced in C99."
11005 msgstr ""
11006 "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 "
11007 "この修飾子は C99 で導入された。"
11008
11009 #. type: Plain text
11010 #: build/C/man3/scanf.3:370
11011 msgid ""
11012 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
11013 "modifier was introduced in C99."
11014 msgstr ""
11015 "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この"
11016 "修飾子は C99 で導入された。"
11017
11018 #. type: Plain text
11019 #: build/C/man3/scanf.3:374
11020 msgid "The following I<conversion specifiers> are available:"
11021 msgstr "以下の I<「変換指定子」> が利用可能である。"
11022
11023 #. type: Plain text
11024 #: build/C/man3/scanf.3:383
11025 msgid ""
11026 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
11027 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
11028 "initial white space characters are discarded), and assignment does not occur."
11029 msgstr ""
11030 "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%"
11031 "\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられ"
11032 "る)、 変数への代入は生じない。"
11033
11034 #. type: TP
11035 #: build/C/man3/scanf.3:383
11036 #, no-wrap
11037 msgid "B<d>"
11038 msgstr "B<d>"
11039
11040 #. type: Plain text
11041 #: build/C/man3/scanf.3:388
11042 msgid ""
11043 "Matches an optionally signed decimal integer; the next pointer must be a "
11044 "pointer to I<int>."
11045 msgstr ""
11046 "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなけれ"
11047 "ばならない。"
11048
11049 #. type: TP
11050 #: build/C/man3/scanf.3:388
11051 #, no-wrap
11052 msgid "B<D>"
11053 msgstr "B<D>"
11054
11055 #. type: Plain text
11056 #: build/C/man3/scanf.3:397
11057 msgid ""
11058 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
11059 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
11060 "causing old programs to fail mysteriously.)"
11061 msgstr ""
11062 "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これ"
11063 "は libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視さ"
11064 "れ、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
11065
11066 #. type: TP
11067 #: build/C/man3/scanf.3:397
11068 #, no-wrap
11069 msgid "B<i>"
11070 msgstr "B<i>"
11071
11072 #. type: Plain text
11073 #: build/C/man3/scanf.3:409
11074 msgid ""
11075 "Matches an optionally signed integer; the next pointer must be a pointer to "
11076 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
11077 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
11078 "that correspond to the base are used."
11079 msgstr ""
11080 "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならな"
11081 "い。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始す"
11082 "る場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用"
11083 "される文字は、これらの基数に対応しているものだけである。"
11084
11085 #. type: TP
11086 #: build/C/man3/scanf.3:409
11087 #, no-wrap
11088 msgid "B<o>"
11089 msgstr "B<o>"
11090
11091 #. type: Plain text
11092 #: build/C/man3/scanf.3:413
11093 msgid ""
11094 "Matches an unsigned octal integer; the next pointer must be a pointer to "
11095 "I<unsigned int>."
11096 msgstr ""
11097 "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければな"
11098 "らない。"
11099
11100 #. type: TP
11101 #: build/C/man3/scanf.3:413
11102 #, no-wrap
11103 msgid "B<u>"
11104 msgstr "B<u>"
11105
11106 #. type: Plain text
11107 #: build/C/man3/scanf.3:418
11108 msgid ""
11109 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
11110 "I<unsigned int>."
11111 msgstr ""
11112 "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタ"
11113 "でなければならない。"
11114
11115 #. type: Plain text
11116 #: build/C/man3/scanf.3:423
11117 msgid ""
11118 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
11119 "to I<unsigned int>."
11120 msgstr ""
11121 "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポイン"
11122 "タでなければならない。"
11123
11124 #. type: TP
11125 #: build/C/man3/scanf.3:423
11126 #, no-wrap
11127 msgid "B<X>"
11128 msgstr "B<X>"
11129
11130 #. type: Plain text
11131 #: build/C/man3/scanf.3:427
11132 msgid "Equivalent to B<x>."
11133 msgstr "B<x> と同一である。"
11134
11135 #. type: TP
11136 #: build/C/man3/scanf.3:427
11137 #, no-wrap
11138 msgid "B<f>"
11139 msgstr "B<f>"
11140
11141 #. type: Plain text
11142 #: build/C/man3/scanf.3:432
11143 msgid ""
11144 "Matches an optionally signed floating-point number; the next pointer must be "
11145 "a pointer to I<float>."
11146 msgstr ""
11147 "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなけ"
11148 "ればならない。"
11149
11150 #. type: TP
11151 #: build/C/man3/scanf.3:432
11152 #, no-wrap
11153 msgid "B<e>"
11154 msgstr "B<e>"
11155
11156 #. type: Plain text
11157 #: build/C/man3/scanf.3:436 build/C/man3/scanf.3:440 build/C/man3/scanf.3:444
11158 msgid "Equivalent to B<f>."
11159 msgstr "B<f> と同一である。"
11160
11161 #. type: TP
11162 #: build/C/man3/scanf.3:436
11163 #, no-wrap
11164 msgid "B<g>"
11165 msgstr "B<g>"
11166
11167 #. type: TP
11168 #: build/C/man3/scanf.3:440
11169 #, no-wrap
11170 msgid "B<E>"
11171 msgstr "B<E>"
11172
11173 #. type: Plain text
11174 #: build/C/man3/scanf.3:448
11175 msgid "(C99) Equivalent to B<f>."
11176 msgstr "(C99)  B<f> と同一である。"
11177
11178 #. type: Plain text
11179 #: build/C/man3/scanf.3:456
11180 msgid ""
11181 "Matches a sequence of non-white-space characters; the next pointer must be a "
11182 "pointer to character array that is long enough to hold the input sequence "
11183 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
11184 "automatically.  The input string stops at white space or at the maximum "
11185 "field width, whichever occurs first."
11186 msgstr ""
11187 "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字"
11188 "の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動"
11189 "的に追加される) 終端の NULL バイト (\\(aq\\e0\\(aq) を格納するのに十分な大き"
11190 "さでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大"
11191 "フィールド幅に 達するか、のどちらかが起こると停止される。"
11192
11193 #. type: Plain text
11194 #: build/C/man3/scanf.3:467
11195 msgid ""
11196 "Matches a sequence of characters whose length is specified by the I<maximum "
11197 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
11198 "there must be enough room for all the characters (no terminating null byte "
11199 "is added).  The usual skip of leading white space is suppressed.  To skip "
11200 "white space first, use an explicit space in the format."
11201 msgstr ""
11202 "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応す"
11203 "る。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な"
11204 "領域が なければならない (終端の NULL バイトは追加されない)。 通常行われる先頭"
11205 "のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ば"
11206 "すためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
11207
11208 #. type: TP
11209 #: build/C/man3/scanf.3:467
11210 #, no-wrap
11211 msgid "B<\\&[>"
11212 msgstr "B<\\&[>"
11213
11214 #. type: Plain text
11215 #: build/C/man3/scanf.3:500
11216 msgid ""
11217 "Matches a nonempty sequence of characters from the specified set of accepted "
11218 "characters; the next pointer must be a pointer to I<char>, and there must be "
11219 "enough room for all the characters in the string, plus a terminating null "
11220 "byte.  The usual skip of leading white space is suppressed.  The string is "
11221 "to be made up of characters in (or not in) a particular set; the set is "
11222 "defined by the characters between the open bracket B<[> character and a "
11223 "close bracket B<]> character.  The set I<excludes> those characters if the "
11224 "first character after the open bracket is a circumflex (B<^>).  To include a "
11225 "close bracket in the set, make it the first character after the open bracket "
11226 "or the circumflex; any other position will end the set.  The hyphen "
11227 "character B<-> is also special; when placed between two other characters, it "
11228 "adds all intervening characters to the set.  To include a hyphen, make it "
11229 "the last character before the final close bracket.  For instance, B<[^]0-9-]"
11230 "> means the set \"everything except close bracket, zero through nine, and "
11231 "hyphen\".  The string ends with the appearance of a character not in the "
11232 "(or, with a circumflex, in) set or when the field width runs out."
11233 msgstr ""
11234 "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空で"
11235 "はない文字の列に対応する。 次のポインタは I<char> へのポインタでなければなら"
11236 "ず、 そこには文字列中のすべての文字と終端の NULL バイト を格納するための十分"
11237 "な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行"
11238 "われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き"
11239 "括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字"
11240 "が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 "
11241 "閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号の"
11242 "あとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が"
11243 "終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた"
11244 "時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませ"
11245 "るためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<"
11246 "[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意"
11247 "味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) "
11248 "文字の 出現または確保された領域が使い切られた時に終了する。"
11249
11250 #. type: Plain text
11251 #: build/C/man3/scanf.3:508
11252 msgid ""
11253 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
11254 "pointer must be a pointer to a pointer to I<void>."
11255 msgstr ""
11256 "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポイン"
11257 "タは I<void> へのポインタへのポインタでなければならない。"
11258
11259 #. type: Plain text
11260 #: build/C/man3/scanf.3:528
11261 msgid ""
11262 "Nothing is expected; instead, the number of characters consumed thus far "
11263 "from the input is stored through the next pointer, which must be a pointer "
11264 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
11265 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
11266 "of a B<%n> directive does not increment the assignment count returned at the "
11267 "completion of execution\" but the Corrigendum seems to contradict this.  "
11268 "Probably it is wise not to make any assumptions on the effect of B<%n> "
11269 "conversions on the return value."
11270 msgstr ""
11271 "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が"
11272 "次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポイン"
11273 "タでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制"
11274 "することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格"
11275 "では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」と"
11276 "なっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換"
11277 "が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
11278
11279 #. type: Plain text
11280 #: build/C/man3/scanf.3:533
11281 msgid ""
11282 "These functions return the number of input items successfully matched and "
11283 "assigned, which can be fewer than provided for, or even zero in the event of "
11284 "an early matching failure."
11285 msgstr ""
11286 "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡され"
11287 "た変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 にな"
11288 "ることもある。"
11289
11290 #. type: Plain text
11291 #: build/C/man3/scanf.3:545
11292 msgid ""
11293 "The value B<EOF> is returned if the end of input is reached before either "
11294 "the first successful conversion or a matching failure occurs.  B<EOF> is "
11295 "also returned if a read error occurs, in which case the error indicator for "
11296 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
11297 "error."
11298 msgstr ""
11299 "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 "
11300 "B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返され"
11301 "る。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ "
11302 "(B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
11303
11304 #. type: Plain text
11305 #: build/C/man3/scanf.3:551
11306 msgid ""
11307 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
11308 "operation would block."
11309 msgstr ""
11310 "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み"
11311 "込み操作は停止 (block) することになる。"
11312
11313 #. type: Plain text
11314 #: build/C/man3/scanf.3:556
11315 msgid ""
11316 "The file descriptor underlying I<stream> is invalid, or not open for reading."
11317 msgstr ""
11318 "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープ"
11319 "ンされていない。"
11320
11321 #. type: Plain text
11322 #: build/C/man3/scanf.3:559
11323 msgid "Input byte sequence does not form a valid character."
11324 msgstr "入力されたバイト列が有効な文字を構成していない。"
11325
11326 #. type: Plain text
11327 #: build/C/man3/scanf.3:563
11328 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
11329 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
11330
11331 #. type: Plain text
11332 #: build/C/man3/scanf.3:568
11333 msgid "Not enough arguments; or I<format> is NULL."
11334 msgstr "引き数が十分でない。または I<format> が NULL である。"
11335
11336 #. type: Plain text
11337 #: build/C/man3/scanf.3:571
11338 msgid "Out of memory."
11339 msgstr "メモリ不足。"
11340
11341 #. type: TP
11342 #: build/C/man3/scanf.3:571
11343 #, no-wrap
11344 msgid "B<ERANGE>"
11345 msgstr "B<ERANGE>"
11346
11347 #. type: Plain text
11348 #: build/C/man3/scanf.3:575
11349 msgid ""
11350 "The result of an integer conversion would exceed the size that can be stored "
11351 "in the corresponding integer type."
11352 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
11353
11354 #. type: Plain text
11355 #: build/C/man3/scanf.3:585
11356 msgid ""
11357 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
11358 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
11359 msgstr ""
11360 "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠し"
11361 "ている。 これらの標準では、エラー B<ERANGE> は規定されていない。"
11362
11363 #. type: Plain text
11364 #: build/C/man3/scanf.3:595
11365 msgid ""
11366 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
11367 "the usage of B<L> in integer conversions is the GNU notation."
11368 msgstr ""
11369 "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での "
11370 "B<ll> または B<L> の使用は GNU での拡張である。"
11371
11372 #. type: Plain text
11373 #: build/C/man3/scanf.3:606
11374 msgid ""
11375 "The Linux version of these functions is based on the I<GNU> I<libio> "
11376 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
11377 "(glibc-1.08)> for a more concise description."
11378 msgstr ""
11379 "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡"
11380 "潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
11381
11382 #.  This feature seems to be present at least as far back as glibc 2.0.
11383 #. type: Plain text
11384 #: build/C/man3/scanf.3:624
11385 msgid ""
11386 "The GNU C library supports a nonstandard extension that causes the library "
11387 "to dynamically allocate a string of sufficient size for input strings for "
11388 "the B<%s> and B<%a[>I<range>B<]> conversion specifiers.  To make use of this "
11389 "feature, specify B<a> as a length modifier (thus B<%as> or B<%a[>I<range>B<]"
11390 ">).  The caller must B<free>(3)  the returned string, as in the following "
11391 "example:"
11392 msgstr ""
11393 "GNU C ライブラリ (glibc) では非標準のオプションをサポートしており、 このオプ"
11394 "ションを使うと変換指定子 B<%s> や B<%a[>I<range>B<]> への入力文字列に対して十"
11395 "分な大きさの文字列をライブラリが動的に確保する ようになる。 この機能を使用す"
11396 "るには、長さ修飾子として B<a> を指定する (したがって、全体としては B<%as> や "
11397 "B<%a[>I<range>B<]> となる)。 以下の例にあるように、呼び出し側は返された文字列"
11398 "を B<free>(3)  しなければならない。"
11399
11400 #. type: Plain text
11401 #: build/C/man3/scanf.3:629
11402 #, no-wrap
11403 msgid ""
11404 "char *p;\n"
11405 "int n;\n"
11406 msgstr ""
11407 "char *p;\n"
11408 "int n;\n"
11409
11410 #. type: Plain text
11411 #: build/C/man3/scanf.3:640
11412 #, no-wrap
11413 msgid ""
11414 "errno = 0;\n"
11415 "n = scanf(\"%a[a-z]\", &p);\n"
11416 "if (n == 1) {\n"
11417 "    printf(\"read: %s\\en\", p);\n"
11418 "    free(p);\n"
11419 "} else if (errno != 0) {\n"
11420 "    perror(\"scanf\");\n"
11421 "} else {\n"
11422 "    fprintf(stderr, \"No matching characters\\en\");\n"
11423 "}\n"
11424 msgstr ""
11425 "errno = 0;\n"
11426 "n = scanf(\"%a[a-z]\", &p);\n"
11427 "if (n == 1) {\n"
11428 "    printf(\"read: %s\\en\", p);\n"
11429 "    free(p);\n"
11430 "} else if (errno != 0) {\n"
11431 "    perror(\"scanf\");\n"
11432 "} else {\n"
11433 "    fprintf(stderr, \"No matching characters\\en\");\n"
11434 "}\n"
11435
11436 #. type: Plain text
11437 #: build/C/man3/scanf.3:648
11438 msgid ""
11439 "As shown in the above example, it is only necessary to call B<free>(3)  if "
11440 "the B<scanf>()  call successfully read a string."
11441 msgstr ""
11442 "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 "
11443 "B<free>(3)  を呼び出す必要がある。"
11444
11445 #. type: Plain text
11446 #: build/C/man3/scanf.3:660
11447 msgid ""
11448 "The B<a> modifier is not available if the program is compiled with I<gcc -"
11449 "std=c99> or I<gcc -D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also "
11450 "specified), in which case the B<a> is interpreted as a specifier for "
11451 "floating-point numbers (see above)."
11452 msgstr ""
11453 "I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプログラムでは "
11454 "(B<_GNU_SOURCE> も同時に指定していない場合)、 B<a> 修飾子は利用できない。 上"
11455 "記の場合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
11456
11457 #. type: Plain text
11458 #: build/C/man3/scanf.3:669
11459 msgid ""
11460 "Since version 2.7, glibc also provides the B<m> modifier for the same "
11461 "purpose as the B<a> modifier.  The B<m> modifier has the following "
11462 "advantages:"
11463 msgstr ""
11464 "バージョン 2.7 以降では、glibc は B<a> 修飾子と同じ目的で B<m> 修飾子も提供し"
11465 "ている。 B<m> 修飾子は以下の利点がある。"
11466
11467 #. type: Plain text
11468 #: build/C/man3/scanf.3:674
11469 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
11470 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
11471
11472 #. type: Plain text
11473 #: build/C/man3/scanf.3:680
11474 msgid ""
11475 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
11476 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
11477 msgstr ""
11478 "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -"
11479 "std=c99> などの影響も避けられる)。"
11480
11481 #. type: Plain text
11482 #: build/C/man3/scanf.3:682
11483 msgid "It is specified in the upcoming revision of the POSIX.1 standard."
11484 msgstr "POSIX.1 標準の次の改訂版で規定される。"
11485
11486 #. type: Plain text
11487 #: build/C/man3/scanf.3:695
11488 msgid ""
11489 "All functions are fully C89 conformant, but provide the additional "
11490 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
11491 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
11492 "the behavior of specifiers defined in C89."
11493 msgstr ""
11494 "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が"
11495 "提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 "
11496 "C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもし"
11497 "れない。"
11498
11499 #. type: Plain text
11500 #: build/C/man3/scanf.3:711
11501 msgid ""
11502 "Some combinations of the type modifiers and conversion specifiers defined by "
11503 "ANSI C do not make sense (e.g.  B<%Ld>).  While they may have a well-defined "
11504 "behavior on Linux, this need not to be so on other architectures.  Therefore "
11505 "it usually is better to use modifiers that are not defined by ANSI C at all, "
11506 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
11507 "B<u>, B<x>, and B<X> conversions or B<ll>."
11508 msgstr ""
11509 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味をなさないも"
11510 "のがある (例えば、 B<%Ld>)。 これらが指定された場合、 Linux 上でははっきりと"
11511 "定義された振る舞いをするかもしれないが、 他のアーキテクチャでも同様になってい"
11512 "るとは限らない。 それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子"
11513 "を使用した方が良い。 すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や "
11514 "B<ll> と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
11515
11516 #. type: Plain text
11517 #: build/C/man3/scanf.3:717
11518 msgid ""
11519 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
11520 "conversions equivalently to B<L>."
11521 msgstr ""
11522 "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮"
11523 "動小数の変換に使用される。"
11524
11525 #. type: Plain text
11526 #: build/C/man3/scanf.3:724
11527 msgid ""
11528 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11529 "B<strtoul>(3)"
11530 msgstr ""
11531 "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
11532 "B<strtoul>(3),"
11533
11534 #. type: TH
11535 #: build/C/man3/setbuf.3:46
11536 #, no-wrap
11537 msgid "SETBUF"
11538 msgstr "SETBUF"
11539
11540 #. type: TH
11541 #: build/C/man3/setbuf.3:46
11542 #, no-wrap
11543 msgid "2008-06-26"
11544 msgstr "2008-06-26"
11545
11546 #. type: Plain text
11547 #: build/C/man3/setbuf.3:49
11548 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
11549 msgstr ""
11550 "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
11551
11552 #. type: Plain text
11553 #: build/C/man3/setbuf.3:54
11554 #, no-wrap
11555 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11556 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
11557
11558 #. type: Plain text
11559 #: build/C/man3/setbuf.3:56
11560 #, no-wrap
11561 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11562 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
11563
11564 #. type: Plain text
11565 #: build/C/man3/setbuf.3:58
11566 #, no-wrap
11567 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11568 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
11569
11570 #. type: Plain text
11571 #: build/C/man3/setbuf.3:61
11572 #, no-wrap
11573 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11574 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
11575
11576 #. type: Plain text
11577 #: build/C/man3/setbuf.3:71
11578 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11579 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
11580
11581 #. type: Plain text
11582 #: build/C/man3/setbuf.3:94
11583 msgid ""
11584 "The three types of buffering available are unbuffered, block buffered, and "
11585 "line buffered.  When an output stream is unbuffered, information appears on "
11586 "the destination file or terminal as soon as written; when it is block "
11587 "buffered many characters are saved up and written as a block; when it is "
11588 "line buffered characters are saved up until a newline is output or input is "
11589 "read from any stream attached to a terminal device (typically I<stdin>).  "
11590 "The function B<fflush>(3)  may be used to force the block out early.  (See "
11591 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
11592 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
11593 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
11594 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
11595 "by default."
11596 msgstr ""
11597 "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが "
11598 "ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 "
11599 "力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、"
11600 "文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新"
11601 "しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、"
11602 "I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的"
11603 "に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、"
11604 "ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行"
11605 "うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通"
11606 "常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは "
11607 "line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に "
11608 "unbuffered である。"
11609
11610 #. type: Plain text
11611 #: build/C/man3/setbuf.3:101
11612 msgid ""
11613 "The B<setvbuf>()  function may be used on any open stream to change its "
11614 "buffer.  The I<mode> argument must be one of the following three macros:"
11615 msgstr ""
11616 "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更"
11617 "できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
11618
11619 #. type: TP
11620 #: build/C/man3/setbuf.3:102
11621 #, no-wrap
11622 msgid "B<_IONBF>"
11623 msgstr "B<_IONBF>"
11624
11625 #. type: Plain text
11626 #: build/C/man3/setbuf.3:105
11627 msgid "unbuffered"
11628 msgstr "unbuffered"
11629
11630 #. type: TP
11631 #: build/C/man3/setbuf.3:105
11632 #, no-wrap
11633 msgid "B<_IOLBF>"
11634 msgstr "B<_IOLBF>"
11635
11636 #. type: Plain text
11637 #: build/C/man3/setbuf.3:108
11638 msgid "line buffered"
11639 msgstr "line buffered"
11640
11641 #. type: TP
11642 #: build/C/man3/setbuf.3:108
11643 #, no-wrap
11644 msgid "B<_IOFBF>"
11645 msgstr "B<_IOFBF>"
11646
11647 #. type: Plain text
11648 #: build/C/man3/setbuf.3:111
11649 msgid "fully buffered"
11650 msgstr "fully buffered"
11651
11652 #. type: Plain text
11653 #: build/C/man3/setbuf.3:127
11654 msgid ""
11655 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
11656 "least I<size> bytes long; this buffer will be used instead of the current "
11657 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
11658 "buffer will be allocated on the next read or write operation.  The B<setvbuf>"
11659 "()  function may only be used after opening a stream and before any other "
11660 "operations have been performed on it."
11661 msgstr ""
11662 "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッ"
11663 "ファを指していなければならない。このバッファは現在の バッファの代わりに用いら"
11664 "れる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッ"
11665 "ファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームを"
11666 "オープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
11667
11668 #. type: Plain text
11669 #: build/C/man3/setbuf.3:133
11670 msgid ""
11671 "The other three calls are, in effect, simply aliases for calls to B<setvbuf>"
11672 "().  The B<setbuf>()  function is exactly equivalent to the call"
11673 msgstr ""
11674 "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 "
11675 "B<setbuf>()  関数は、"
11676
11677 #. type: Plain text
11678 #: build/C/man3/setbuf.3:136
11679 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
11680 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
11681
11682 #. type: Plain text
11683 #: build/C/man3/setbuf.3:146
11684 msgid ""
11685 "The B<setbuffer>()  function is the same, except that the size of the buffer "
11686 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
11687 "The B<setlinebuf>()  function is exactly equivalent to the call:"
11688 msgstr ""
11689 "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 "
11690 "B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数"
11691 "は以下と同じである。"
11692
11693 #. type: Plain text
11694 #: build/C/man3/setbuf.3:149
11695 msgid "setvbuf(stream, (char *) NULL, _IOLBF, 0);"
11696 msgstr "setvbuf(stream, (char *) NULL, _IOLBF, 0);"
11697
11698 #. type: Plain text
11699 #: build/C/man3/setbuf.3:160
11700 msgid ""
11701 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
11702 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
11703 "I<errno> on failure."
11704 msgstr ""
11705 "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す "
11706 "(失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合であ"
11707 "る)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
11708
11709 #. type: Plain text
11710 #: build/C/man3/setbuf.3:162
11711 msgid "The other functions do not return a value."
11712 msgstr "その他の関数は値を返さない。"
11713
11714 #. type: Plain text
11715 #: build/C/man3/setbuf.3:168
11716 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
11717 msgstr ""
11718 "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
11719
11720 #. type: Plain text
11721 #: build/C/man3/setbuf.3:178
11722 msgid ""
11723 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
11724 "versions of BSD before 4.2BSD, and are available under Linux since libc "
11725 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
11726 "buffer size and should be avoided."
11727 msgstr ""
11728 "B<setbuffer>()  関数および B<setlinebuf>()  関数は 4.2BSD より前の BSD とは互"
11729 "換性がない。また Linux でも(古いバージョン では)利用できないかもしれない。"
11730 "4.2BSD および 4.3BSD のシステムでは B<setbuf>()  は必ず追加のバッファーのサイ"
11731 "ズを使用するので、これも使うべきでない。"
11732
11733 #. type: Plain text
11734 #: build/C/man3/setbuf.3:185
11735 msgid ""
11736 "You must make sure that the space that I<buf> points to still exists by the "
11737 "time I<stream> is closed, which also happens at program termination.  For "
11738 "example, the following is invalid:"
11739 msgstr ""
11740 "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> "
11741 "が指し示す空間とが存在していることを保証しなければならない。 例えば、次のよう"
11742 "な使い方は許されない:"
11743
11744 #. type: Plain text
11745 #: build/C/man3/setbuf.3:188
11746 #, no-wrap
11747 msgid "#include E<lt>stdio.hE<gt>\n"
11748 msgstr "#include E<lt>stdio.hE<gt>\n"
11749
11750 #. type: Plain text
11751 #: build/C/man3/setbuf.3:197
11752 #, no-wrap
11753 msgid ""
11754 "int\n"
11755 "main(void)\n"
11756 "{\n"
11757 "    char buf[BUFSIZ];\n"
11758 "    setbuf(stdin, buf);\n"
11759 "    printf(\"Hello, world!\\en\");\n"
11760 "    return 0;\n"
11761 "}\n"
11762 msgstr ""
11763 "int\n"
11764 "main(void)\n"
11765 "{\n"
11766 "    char buf[BUFSIZ];\n"
11767 "    setbuf(stdin, buf);\n"
11768 "    printf(\"Hello, world!\\en\");\n"
11769 "    return 0;\n"
11770 "}\n"
11771
11772 #. type: Plain text
11773 #: build/C/man3/setbuf.3:206
11774 msgid ""
11775 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
11776 "(3), B<puts>(3)"
11777 msgstr ""
11778 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>"
11779 "(3), B<puts>(3)"
11780
11781 #. type: TH
11782 #: build/C/man3/stdin.3:9
11783 #, no-wrap
11784 msgid "STDIN"
11785 msgstr "STDIN"
11786
11787 #. type: TH
11788 #: build/C/man3/stdin.3:9 build/C/man3/tmpfile.3:29
11789 #, no-wrap
11790 msgid "2008-07-14"
11791 msgstr "2008-07-14"
11792
11793 #. type: Plain text
11794 #: build/C/man3/stdin.3:12
11795 msgid "stdin, stdout, stderr - standard I/O streams"
11796 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
11797
11798 #. type: Plain text
11799 #: build/C/man3/stdin.3:19
11800 #, no-wrap
11801 msgid ""
11802 "B<extern FILE *>I<stdin>B<;>\n"
11803 "B<extern FILE *>I<stdout>B<;>\n"
11804 "B<extern FILE *>I<stderr>B<;>\n"
11805 msgstr ""
11806 "B<extern FILE *>I<stdin>B<;>\n"
11807 "B<extern FILE *>I<stdout>B<;>\n"
11808 "B<extern FILE *>I<stderr>B<;>\n"
11809
11810 #. type: Plain text
11811 #: build/C/man3/stdin.3:31
11812 msgid ""
11813 "Under normal circumstances every UNIX program has three streams opened for "
11814 "it when it starts up, one for input, one for output, and one for printing "
11815 "diagnostic or error messages.  These are typically attached to the user's "
11816 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
11817 "depending on what the parent process chose to set up.  (See also the "
11818 "\"Redirection\" section of B<sh>(1).)"
11819 msgstr ""
11820 "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを "
11821 "3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表"
11822 "示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されてい"
11823 "るが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられて"
11824 "いることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
11825
11826 #. type: Plain text
11827 #: build/C/man3/stdin.3:41
11828 msgid ""
11829 "The input stream is referred to as \"standard input\"; the output stream is "
11830 "referred to as \"standard output\"; and the error stream is referred to as "
11831 "\"standard error\".  These terms are abbreviated to form the symbols used to "
11832 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
11833 msgstr ""
11834 "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard "
11835 "output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短"
11836 "縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, "
11837 "I<stdout>, I<stderr> である。"
11838
11839 #. type: Plain text
11840 #: build/C/man3/stdin.3:50
11841 msgid ""
11842 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
11843 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
11844 msgstr ""
11845 "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。した"
11846 "がって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
11847
11848 #. type: Plain text
11849 #: build/C/man3/stdin.3:59
11850 msgid ""
11851 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
11852 "same underlying files may also be accessed using the raw UNIX file "
11853 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
11854 msgstr ""
11855 "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であ"
11856 "るから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルイン"
11857 "タフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもでき"
11858 "る。"
11859
11860 #. type: Plain text
11861 #: build/C/man3/stdin.3:78
11862 msgid ""
11863 "On program startup, the integer file descriptors associated with the streams "
11864 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
11865 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
11866 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>"
11867 "(3)  to one of these streams can change the file descriptor number "
11868 "associated with the stream.)"
11869 msgstr ""
11870 "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけ"
11871 "られているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロ"
11872 "セッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は "
11873 "I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのスト"
11874 "リームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられ"
11875 "たファイルディスクリプタ の番号を変更することができる。)"
11876
11877 #. type: Plain text
11878 #: build/C/man3/stdin.3:91
11879 msgid ""
11880 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
11881 "unexpected results and should generally be avoided.  (For the masochistic "
11882 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
11883 "is supposed to work.)  A general rule is that file descriptors are handled "
11884 "in the kernel, while stdio is just a library.  This means for example, that "
11885 "after an B<exec>(3), the child inherits all open file descriptors, but all "
11886 "old streams have become inaccessible."
11887 msgstr ""
11888 "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ るこ"
11889 "とがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセ"
11890 "クション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されて"
11891 "いる。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによっ"
11892 "て 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば "
11893 "B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ を"
11894 "すべて継承するが、親からのストリームはすべてアクセス不可となる。"
11895
11896 #. type: Plain text
11897 #: build/C/man3/stdin.3:109
11898 msgid ""
11899 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
11900 "macros, assigning to them is nonportable.  The standard streams can be made "
11901 "to refer to different files with help of the library function B<freopen>(3), "
11902 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
11903 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
11904 "by normal program termination."
11905 msgstr ""
11906 "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているの"
11907 "で、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 "
11908 "B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 こ"
11909 "のライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように"
11910 "特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プロ"
11911 "グラムの正常終了によってクローズされる。"
11912
11913 #. type: Plain text
11914 #: build/C/man3/stdin.3:118
11915 msgid ""
11916 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
11917 "standard also stipulates that these three streams shall be open at program "
11918 "startup."
11919 msgstr ""
11920 "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、"
11921 "これら 3 つのストリームがプログラム の起動時にオープンされているべきであるこ"
11922 "とが規定されている。"
11923
11924 #. type: Plain text
11925 #: build/C/man3/stdin.3:150
11926 msgid ""
11927 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
11928 "when it points to a terminal.  Partial lines will not appear until B<fflush>"
11929 "(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce "
11930 "unexpected results, especially with debugging output.  The buffering mode of "
11931 "the standard streams (or any other stream)  can be changed using the "
11932 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
11933 "associated with a terminal, there may also be input buffering in the "
11934 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
11935 "terminal input is line buffered in the kernel.)  This kernel input handling "
11936 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
11937 "B<termios>(3)."
11938 msgstr ""
11939 "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端"
11940 "末に接続されているときには行単位でバッファリング されている。一行に満たない内"
11941 "容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるま"
11942 "で表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因と"
11943 "なるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッ"
11944 "ファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによっ"
11945 "て変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバ"
11946 "でバッファリングされている 可能性がある点にも注意すること。これは stdio の"
11947 "バッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネル"
11948 "によって行単位 でバッファリングされている。) このカーネルによる入力の扱いは "
11949 "B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と "
11950 "B<termios>(3)  も参照すること。"
11951
11952 #. type: Plain text
11953 #: build/C/man3/stdin.3:156
11954 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
11955 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
11956
11957 #. type: TH
11958 #: build/C/man3/stdio.3:37
11959 #, no-wrap
11960 msgid "STDIO"
11961 msgstr "STDIO"
11962
11963 #. type: TH
11964 #: build/C/man3/stdio.3:37
11965 #, no-wrap
11966 msgid "2001-12-26"
11967 msgstr "2001-12-26"
11968
11969 #. type: Plain text
11970 #: build/C/man3/stdio.3:40
11971 msgid "stdio - standard input/output library functions"
11972 msgstr "stdio - 標準入出力ライブラリ関数"
11973
11974 #. type: Plain text
11975 #: build/C/man3/stdio.3:44
11976 msgid "B<FILE *>I<stdin>B<;>"
11977 msgstr "B<FILE *>I<stdin>B<;>"
11978
11979 #. type: Plain text
11980 #: build/C/man3/stdio.3:46
11981 msgid "B<FILE *>I<stdout>B<;>"
11982 msgstr "B<FILE *>I<stdout>B<;>"
11983
11984 #. type: Plain text
11985 #: build/C/man3/stdio.3:48
11986 msgid "B<FILE *>I<stderr>B<;>"
11987 msgstr "B<FILE *>I<stderr>B<;>"
11988
11989 #. type: Plain text
11990 #: build/C/man3/stdio.3:55
11991 msgid ""
11992 "The standard I/O library provides a simple and efficient buffered stream I/O "
11993 "interface.  Input and output is mapped into logical data streams and the "
11994 "physical I/O characteristics are concealed.  The functions and macros are "
11995 "listed below; more information is available from the individual man pages."
11996 msgstr ""
11997 "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入"
11998 "出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けら"
11999 "れ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを"
12000 "以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
12001
12002 #. type: Plain text
12003 #: build/C/man3/stdio.3:78
12004 msgid ""
12005 "A stream is associated with an external file (which may be a physical "
12006 "device) by I<opening> a file, which may involve creating a new file.  "
12007 "Creating an existing file causes its former contents to be discarded.  If a "
12008 "file can support positioning requests (such as a disk file, as opposed to a "
12009 "terminal) then a I<file position indicator> associated with the stream is "
12010 "positioned at the start of the file (byte zero), unless the file is opened "
12011 "with append mode.  If append mode is used, it is unspecified whether the "
12012 "position indicator will be placed at the start or the end of the file.  The "
12013 "position indicator is maintained by subsequent reads, writes and positioning "
12014 "requests.  All input occurs as if the characters were read by successive "
12015 "calls to the B<fgetc>(3)  function; all output takes place as if all "
12016 "characters were written by successive calls to the B<fputc>(3)  function."
12017 msgstr ""
12018 "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル "
12019 "(通常は物理デバイス) に連結される。 この操作には新しくファイルを作成すること"
12020 "も含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイ"
12021 "ルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている "
12022 "(ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 その"
12023 "ストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追"
12024 "加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを"
12025 "使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定さ"
12026 "れていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更さ"
12027 "れる。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだか"
12028 "のように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文"
12029 "字を書き込んだかのように行われる。"
12030
12031 #. type: Plain text
12032 #: build/C/man3/stdio.3:88
12033 msgid ""
12034 "A file is disassociated from a stream by I<closing> the file.  Output "
12035 "streams are flushed (any unwritten buffer contents are transferred to the "
12036 "host environment) before the stream is disassociated from the file.  The "
12037 "value of a pointer to a I<FILE> object is indeterminate after a file is "
12038 "closed (garbage)."
12039 msgstr ""
12040 "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームか"
12041 "ら切り離される。 出力ストリームは、そのストリームがファイルから切り離される前"
12042 "にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転"
12043 "送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不"
12044 "確定になる (ゴミになってしまう)。"
12045
12046 #. type: Plain text
12047 #: build/C/man3/stdio.3:101
12048 msgid ""
12049 "A file may be subsequently reopened, by the same or another program "
12050 "execution, and its contents reclaimed or modified (if it can be repositioned "
12051 "at the start).  If the main function returns to its original caller, or the "
12052 "B<exit>(3)  function is called, all open files are closed (hence all output "
12053 "streams are flushed) before program termination.  Other methods of program "
12054 "termination, such as B<abort>(3)  do not bother about closing files properly."
12055 msgstr ""
12056 "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることも"
12057 "あり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動"
12058 "が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が"
12059 "呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じら"
12060 "れる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止"
12061 "に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる"
12062 "保証はない。"
12063
12064 #. type: Plain text
12065 #: build/C/man3/stdio.3:117
12066 msgid ""
12067 "At program startup, three text streams are predefined and need not be opened "
12068 "explicitly: I<standard input> (for reading conventional input), I<standard "
12069 "output> (for writing conventional input), and I<standard error> (for writing "
12070 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
12071 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
12072 "the standard input and output streams are fully buffered if and only if the "
12073 "streams do not to refer to an interactive device."
12074 msgstr ""
12075 "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは"
12076 "明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るの"
12077 "に使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標"
12078 "準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらの"
12079 "ストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンさ"
12080 "れたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標"
12081 "準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイ"
12082 "スを参照していなければ、 完全にバッファリングされている。"
12083
12084 #. type: Plain text
12085 #: build/C/man3/stdio.3:127
12086 msgid ""
12087 "Output streams that refer to terminal devices are always line buffered by "
12088 "default; pending output to such streams is written automatically whenever an "
12089 "input stream that refers to a terminal device is read.  In cases where a "
12090 "large amount of computation is done after printing part of a line on an "
12091 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
12092 "going off and computing so that the output will appear."
12093 msgstr ""
12094 "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリ"
12095 "ングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末"
12096 "デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き"
12097 "込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表"
12098 "示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する"
12099 "必要がある。"
12100
12101 #. type: Plain text
12102 #: build/C/man3/stdio.3:141
12103 msgid ""
12104 "The I<stdio> library is a part of the library B<libc> and routines are "
12105 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
12106 "SYNOPSIS sections of the following manual pages indicate which include files "
12107 "are to be used, what the compiler declaration for the function looks like "
12108 "and which external variables are of interest."
12109 msgstr ""
12110 "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイ"
12111 "ラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述す"
12112 "る man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければ"
12113 "ならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変"
12114 "数が関係するのかが示されている。"
12115
12116 #.  Not on Linux: .BR fropen ,
12117 #.  Not on Linux: .BR fwopen ,
12118 #. type: Plain text
12119 #: build/C/man3/stdio.3:181
12120 msgid ""
12121 "The following are defined as macros; these names may not be reused without "
12122 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
12123 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
12124 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
12125 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
12126 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
12127 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
12128 "and B<putchar> exist and will be used if the macros definitions are "
12129 "explicitly removed."
12130 msgstr ""
12131 "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, "
12132 "B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, "
12133 "B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, "
12134 "B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されて"
12135 "いる。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用するこ"
12136 "とはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, "
12137 "B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明"
12138 "示的に消去されている場合には、 これらを使用することになるだろう。"
12139
12140 #. type: SS
12141 #: build/C/man3/stdio.3:181
12142 #, no-wrap
12143 msgid "List of Functions"
12144 msgstr "関数のリスト"
12145
12146 #. type: tbl table
12147 #: build/C/man3/stdio.3:186
12148 #, no-wrap
12149 msgid "Function\tDescription\n"
12150 msgstr "関数\t説明\n"
12151
12152 #. type: tbl table
12153 #: build/C/man3/stdio.3:187
12154 #, no-wrap
12155 msgid "_\n"
12156 msgstr "_\n"
12157
12158 #. type: tbl table
12159 #: build/C/man3/stdio.3:188
12160 #, no-wrap
12161 msgid "clearerr\tcheck and reset stream status\n"
12162 msgstr "clearerr\tストリームの状態の確認とリセット\n"
12163
12164 #. type: tbl table
12165 #: build/C/man3/stdio.3:189
12166 #, no-wrap
12167 msgid "fclose\tclose a stream\n"
12168 msgstr "fclose\tストリームをクローズする\n"
12169
12170 #. type: tbl table
12171 #: build/C/man3/stdio.3:190
12172 #, no-wrap
12173 msgid "fdopen\tstream open functions\n"
12174 msgstr "fdopen\tストリームをオープンする\n"
12175
12176 #. type: tbl table
12177 #: build/C/man3/stdio.3:191
12178 #, no-wrap
12179 msgid "feof\tcheck and reset stream status\n"
12180 msgstr "feof\tストリームの状態の確認とリセット\n"
12181
12182 #. type: tbl table
12183 #: build/C/man3/stdio.3:192
12184 #, no-wrap
12185 msgid "ferror\tcheck and reset stream status\n"
12186 msgstr "ferror\tストリームの状態の確認とリセット\n"
12187
12188 #. type: tbl table
12189 #: build/C/man3/stdio.3:193
12190 #, no-wrap
12191 msgid "fflush\tflush a stream\n"
12192 msgstr "fflush\tストリームをフラッシュする\n"
12193
12194 #. type: tbl table
12195 #: build/C/man3/stdio.3:194
12196 #, no-wrap
12197 msgid "fgetc\tget next character or word from input stream\n"
12198 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
12199
12200 #. type: tbl table
12201 #: build/C/man3/stdio.3:195
12202 #, no-wrap
12203 msgid "fgetpos\treposition a stream\n"
12204 msgstr "fgetpos\tストリームの位置を取得する\n"
12205
12206 #. type: tbl table
12207 #: build/C/man3/stdio.3:196
12208 #, no-wrap
12209 msgid "fgets\tget a line from a stream\n"
12210 msgstr "fgets\tストリームから行を取得する\n"
12211
12212 #. type: tbl table
12213 #: build/C/man3/stdio.3:197
12214 #, no-wrap
12215 msgid "fileno\treturn the integer descriptor of the argument stream\n"
12216 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
12217
12218 #. type: tbl table
12219 #: build/C/man3/stdio.3:198
12220 #, no-wrap
12221 msgid "fopen\tstream open functions\n"
12222 msgstr "fopen\tストリームをオープンする\n"
12223
12224 #. type: tbl table
12225 #: build/C/man3/stdio.3:199
12226 #, no-wrap
12227 msgid "fprintf\tformatted output conversion\n"
12228 msgstr "fprintf\t書式付き出力変換\n"
12229
12230 #. type: tbl table
12231 #: build/C/man3/stdio.3:200
12232 #, no-wrap
12233 msgid "fpurge\tflush a stream\n"
12234 msgstr "fpurge\tストリームをフラッシュする\n"
12235
12236 #. type: tbl table
12237 #: build/C/man3/stdio.3:201
12238 #, no-wrap
12239 msgid "fputc\toutput a character or word to a stream\n"
12240 msgstr "fputc\t文字または語をストリームに出力する\n"
12241
12242 #. type: tbl table
12243 #: build/C/man3/stdio.3:202
12244 #, no-wrap
12245 msgid "fputs\toutput a line to a stream\n"
12246 msgstr "fputs\t行をストリームに出力する\n"
12247
12248 #. type: tbl table
12249 #: build/C/man3/stdio.3:203
12250 #, no-wrap
12251 msgid "fread\tbinary stream input/output\n"
12252 msgstr "fread\tバイナリーストリーム入出力\n"
12253
12254 #. type: tbl table
12255 #: build/C/man3/stdio.3:204
12256 #, no-wrap
12257 msgid "freopen\tstream open functions\n"
12258 msgstr "freopen\tストリームをオープンする\n"
12259
12260 #. type: tbl table
12261 #: build/C/man3/stdio.3:205
12262 #, no-wrap
12263 msgid "fscanf\tinput format conversion\n"
12264 msgstr "fscanf\t書式付き入力変換\n"
12265
12266 #. type: tbl table
12267 #: build/C/man3/stdio.3:206
12268 #, no-wrap
12269 msgid "fseek\treposition a stream\n"
12270 msgstr "fseek\tストリームの位置指示子を移動する\n"
12271
12272 #. type: tbl table
12273 #: build/C/man3/stdio.3:207
12274 #, no-wrap
12275 msgid "fsetpos\treposition a stream\n"
12276 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
12277
12278 #. type: tbl table
12279 #: build/C/man3/stdio.3:208
12280 #, no-wrap
12281 msgid "ftell\treposition a stream\n"
12282 msgstr "ftell\tストリームの位置を取得する\n"
12283
12284 #. type: tbl table
12285 #: build/C/man3/stdio.3:209
12286 #, no-wrap
12287 msgid "fwrite\tbinary stream input/output\n"
12288 msgstr "fwrite\tバイナリーストリーム入出力\n"
12289
12290 #. type: tbl table
12291 #: build/C/man3/stdio.3:210
12292 #, no-wrap
12293 msgid "getc\tget next character or word from input stream\n"
12294 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
12295
12296 #. type: tbl table
12297 #: build/C/man3/stdio.3:211
12298 #, no-wrap
12299 msgid "getchar\tget next character or word from input stream\n"
12300 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
12301
12302 #. type: tbl table
12303 #: build/C/man3/stdio.3:212
12304 #, no-wrap
12305 msgid "gets\tget a line from a stream\n"
12306 msgstr "gets\t行を入力ストリームから取得する\n"
12307
12308 #. type: tbl table
12309 #: build/C/man3/stdio.3:213
12310 #, no-wrap
12311 msgid "getw\tget next character or word from input stream\n"
12312 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
12313
12314 #. type: tbl table
12315 #: build/C/man3/stdio.3:214
12316 #, no-wrap
12317 msgid "mktemp\tmake temporary filename (unique)\n"
12318 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
12319
12320 #. type: tbl table
12321 #: build/C/man3/stdio.3:215
12322 #, no-wrap
12323 msgid "perror\tsystem error messages\n"
12324 msgstr "perror\tシステムエラーメッセージ\n"
12325
12326 #. type: tbl table
12327 #: build/C/man3/stdio.3:216
12328 #, no-wrap
12329 msgid "printf\tformatted output conversion\n"
12330 msgstr "printf\t書式付き出力変換\n"
12331
12332 #. type: tbl table
12333 #: build/C/man3/stdio.3:217
12334 #, no-wrap
12335 msgid "putc\toutput a character or word to a stream\n"
12336 msgstr "putc\t文字または語をストリームに出力する\n"
12337
12338 #. type: tbl table
12339 #: build/C/man3/stdio.3:218
12340 #, no-wrap
12341 msgid "putchar\toutput a character or word to a stream\n"
12342 msgstr "putchar\t文字または語をストリームに出力する\n"
12343
12344 #. type: tbl table
12345 #: build/C/man3/stdio.3:219
12346 #, no-wrap
12347 msgid "puts\toutput a line to a stream\n"
12348 msgstr "puts\t行をストリームに出力する\n"
12349
12350 #. type: tbl table
12351 #: build/C/man3/stdio.3:220
12352 #, no-wrap
12353 msgid "putw\toutput a character or word to a stream\n"
12354 msgstr "putw\t文字または語をストリームに出力する\n"
12355
12356 #. type: tbl table
12357 #: build/C/man3/stdio.3:221
12358 #, no-wrap
12359 msgid "remove\tremove directory entry\n"
12360 msgstr "remove\tディレクトリエントリを削除する\n"
12361
12362 #. type: tbl table
12363 #: build/C/man3/stdio.3:222
12364 #, no-wrap
12365 msgid "rewind\treposition a stream\n"
12366 msgstr "rewind\tストリームの位置指示子を移動する\n"
12367
12368 #. type: tbl table
12369 #: build/C/man3/stdio.3:223
12370 #, no-wrap
12371 msgid "scanf\tinput format conversion\n"
12372 msgstr "scanf\t書式付き入力変換\n"
12373
12374 #. type: tbl table
12375 #: build/C/man3/stdio.3:224
12376 #, no-wrap
12377 msgid "setbuf\tstream buffering operations\n"
12378 msgstr "setbuf\tストリームのバッファリングの操作\n"
12379
12380 #. type: tbl table
12381 #: build/C/man3/stdio.3:225
12382 #, no-wrap
12383 msgid "setbuffer\tstream buffering operations\n"
12384 msgstr "setbuffer\tストリームのバッファリングの操作\n"
12385
12386 #. type: tbl table
12387 #: build/C/man3/stdio.3:226
12388 #, no-wrap
12389 msgid "setlinebuf\tstream buffering operations\n"
12390 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
12391
12392 #. type: tbl table
12393 #: build/C/man3/stdio.3:227
12394 #, no-wrap
12395 msgid "setvbuf\tstream buffering operations\n"
12396 msgstr "setvbuf\tストリームのバッファリングの操作\n"
12397
12398 #. type: tbl table
12399 #: build/C/man3/stdio.3:228
12400 #, no-wrap
12401 msgid "sprintf\tformatted output conversion\n"
12402 msgstr "sprintf\t書式付き出力変換\n"
12403
12404 #. type: tbl table
12405 #: build/C/man3/stdio.3:229
12406 #, no-wrap
12407 msgid "sscanf\tinput format conversion\n"
12408 msgstr "sscanf\t書式付き入力変換\n"
12409
12410 #. type: tbl table
12411 #: build/C/man3/stdio.3:230
12412 #, no-wrap
12413 msgid "strerror\tsystem error messages\n"
12414 msgstr "strerror\tシステムエラーメッセージ\n"
12415
12416 #. type: tbl table
12417 #: build/C/man3/stdio.3:231
12418 #, no-wrap
12419 msgid "sys_errlist\tsystem error messages\n"
12420 msgstr "sys_errlist\tシステムエラーメッセージ\n"
12421
12422 #. type: tbl table
12423 #: build/C/man3/stdio.3:232
12424 #, no-wrap
12425 msgid "sys_nerr\tsystem error messages\n"
12426 msgstr "sys_nerr\tシステムエラーメッセージ\n"
12427
12428 #. type: tbl table
12429 #: build/C/man3/stdio.3:233
12430 #, no-wrap
12431 msgid "tempnam\ttemporary file routines\n"
12432 msgstr "tempnam\tテンポラリファイルの操作\n"
12433
12434 #. type: tbl table
12435 #: build/C/man3/stdio.3:234
12436 #, no-wrap
12437 msgid "tmpfile\ttemporary file routines\n"
12438 msgstr "tmpfile\tテンポラリファイルの操作\n"
12439
12440 #. type: tbl table
12441 #: build/C/man3/stdio.3:235
12442 #, no-wrap
12443 msgid "tmpnam\ttemporary file routines\n"
12444 msgstr "tmpnam\tテンポラリファイルの操作\n"
12445
12446 #. type: tbl table
12447 #: build/C/man3/stdio.3:236
12448 #, no-wrap
12449 msgid "ungetc\tun-get character from input stream\n"
12450 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
12451
12452 #. type: tbl table
12453 #: build/C/man3/stdio.3:237
12454 #, no-wrap
12455 msgid "vfprintf\tformatted output conversion\n"
12456 msgstr "vfprintf\t書式付き出力変換\n"
12457
12458 #. type: tbl table
12459 #: build/C/man3/stdio.3:238
12460 #, no-wrap
12461 msgid "vfscanf\tinput format conversion\n"
12462 msgstr "vfscanf\t書式付き入力変換\n"
12463
12464 #. type: tbl table
12465 #: build/C/man3/stdio.3:239
12466 #, no-wrap
12467 msgid "vprintf\tformatted output conversion\n"
12468 msgstr "vprintf\t書式付き出力変換\n"
12469
12470 #. type: tbl table
12471 #: build/C/man3/stdio.3:240
12472 #, no-wrap
12473 msgid "vscanf\tinput format conversion\n"
12474 msgstr "vscanf\t書式付き入力変換\n"
12475
12476 #. type: tbl table
12477 #: build/C/man3/stdio.3:241
12478 #, no-wrap
12479 msgid "vsprintf\tformatted output conversion\n"
12480 msgstr "vsprintf\t書式付き出力変換\n"
12481
12482 #. type: tbl table
12483 #: build/C/man3/stdio.3:242
12484 #, no-wrap
12485 msgid "vsscanf\tinput format conversion\n"
12486 msgstr "vsscanf\t書式付き入力変換\n"
12487
12488 #. type: Plain text
12489 #: build/C/man3/stdio.3:248
12490 msgid "The I<stdio> library conforms to C89."
12491 msgstr "I<stdio> ライブラリは C89 に準拠している。"
12492
12493 #. type: Plain text
12494 #: build/C/man3/stdio.3:255
12495 msgid ""
12496 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12497 "B<unlocked_stdio>(3)"
12498 msgstr ""
12499 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
12500 "B<unlocked_stdio>(3)"
12501
12502 #. type: TH
12503 #: build/C/man3/stdio_ext.3:23
12504 #, no-wrap
12505 msgid "STDIO_EXT"
12506 msgstr "STDIO_EXT"
12507
12508 #. type: TH
12509 #: build/C/man3/stdio_ext.3:23
12510 #, no-wrap
12511 msgid "2001-12-16"
12512 msgstr "2001-12-16"
12513
12514 #. type: Plain text
12515 #: build/C/man3/stdio_ext.3:28
12516 msgid ""
12517 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12518 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
12519 "structure"
12520 msgstr ""
12521 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
12522 "__fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体"
12523 "へのインタフェース"
12524
12525 #. type: Plain text
12526 #: build/C/man3/stdio_ext.3:32
12527 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
12528 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
12529
12530 #. type: Plain text
12531 #: build/C/man3/stdio_ext.3:34
12532 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12533 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
12534
12535 #. type: Plain text
12536 #: build/C/man3/stdio_ext.3:36
12537 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
12538 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
12539
12540 #. type: Plain text
12541 #: build/C/man3/stdio_ext.3:38
12542 msgid "B<int __flbf(FILE *>I<stream>B<);>"
12543 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
12544
12545 #. type: Plain text
12546 #: build/C/man3/stdio_ext.3:40
12547 msgid "B<int __freadable(FILE *>I<stream>B<);>"
12548 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
12549
12550 #. type: Plain text
12551 #: build/C/man3/stdio_ext.3:42
12552 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
12553 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
12554
12555 #. type: Plain text
12556 #: build/C/man3/stdio_ext.3:44
12557 msgid "B<int __freading(FILE *>I<stream>B<);>"
12558 msgstr "B<int __freading(FILE *>I<stream>B<);>"
12559
12560 #. type: Plain text
12561 #: build/C/man3/stdio_ext.3:46
12562 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
12563 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
12564
12565 #. type: Plain text
12566 #: build/C/man3/stdio_ext.3:48
12567 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12568 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
12569
12570 #. type: Plain text
12571 #: build/C/man3/stdio_ext.3:50
12572 msgid "B<void _flushlbf(void);>"
12573 msgstr "B<void _flushlbf(void);>"
12574
12575 #. type: Plain text
12576 #: build/C/man3/stdio_ext.3:52
12577 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
12578 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
12579
12580 #. type: Plain text
12581 #: build/C/man3/stdio_ext.3:57
12582 msgid ""
12583 "Solaris introduced routines to allow portable access to the internals of the "
12584 "I<FILE> structure, and glibc also implemented these."
12585 msgstr ""
12586 "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段"
12587 "が導入されており、これらは glibc でも実装されている。"
12588
12589 #. type: Plain text
12590 #: build/C/man3/stdio_ext.3:62
12591 msgid ""
12592 "The B<__fbufsize>()  function returns the size of the buffer currently used "
12593 "by the given stream."
12594 msgstr ""
12595 "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返"
12596 "す。"
12597
12598 #. type: Plain text
12599 #: build/C/man3/stdio_ext.3:69
12600 msgid ""
12601 "The B<__fpending>()  function returns the number of bytes in the output "
12602 "buffer.  For wide-oriented streams the unit is wide characters.  This "
12603 "function is undefined on buffers in reading mode, or opened read-only."
12604 msgstr ""
12605 "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワ"
12606 "イドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッ"
12607 "ファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞い"
12608 "は未定義である。"
12609
12610 #. type: Plain text
12611 #: build/C/man3/stdio_ext.3:74
12612 msgid ""
12613 "The B<__flbf>()  function returns a nonzero value if the stream is line-"
12614 "buffered, and zero otherwise."
12615 msgstr ""
12616 "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の"
12617 "場合は 0 を返す。"
12618
12619 #. type: Plain text
12620 #: build/C/man3/stdio_ext.3:79
12621 msgid ""
12622 "The B<__freadable>()  function returns a nonzero value if the stream allows "
12623 "reading, and zero otherwise."
12624 msgstr ""
12625 "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以"
12626 "外の場合は 0 を返す。"
12627
12628 #. type: Plain text
12629 #: build/C/man3/stdio_ext.3:84
12630 msgid ""
12631 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
12632 "writing, and zero otherwise."
12633 msgstr ""
12634 "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以"
12635 "外の場合は 0 を返す。"
12636
12637 #. type: Plain text
12638 #: build/C/man3/stdio_ext.3:90
12639 msgid ""
12640 "The B<__freading>()  function returns a nonzero value if the stream is read-"
12641 "only, or if the last operation on the stream was a read operation, and zero "
12642 "otherwise."
12643 msgstr ""
12644 "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対"
12645 "する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 "
12646 "を返す。"
12647
12648 #. type: Plain text
12649 #: build/C/man3/stdio_ext.3:96
12650 msgid ""
12651 "The B<__fwriting>()  function returns a nonzero value if the stream is write-"
12652 "only (or append-only), or if the last operation on the stream was a write "
12653 "operation, and zero otherwise."
12654 msgstr ""
12655 "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 "
12656 "またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返"
12657 "し、 それ以外の場合は 0 を返す。"
12658
12659 #. type: Plain text
12660 #: build/C/man3/stdio_ext.3:104
12661 msgid ""
12662 "The B<__fsetlocking>()  function can be used to select the desired type of "
12663 "locking on the stream.  It returns the current type.  The I<type> argument "
12664 "can take the following three values:"
12665 msgstr ""
12666 "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用でき"
12667 "る。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をと"
12668 "ることができる :"
12669
12670 #. type: TP
12671 #: build/C/man3/stdio_ext.3:104
12672 #, no-wrap
12673 msgid "B<FSETLOCKING_INTERNAL>"
12674 msgstr "B<FSETLOCKING_INTERNAL>"
12675
12676 #. type: Plain text
12677 #: build/C/man3/stdio_ext.3:109
12678 msgid ""
12679 "Perform implicit locking around every operation on the given stream (except "
12680 "for the *_unlocked ones).  This is the default."
12681 msgstr ""
12682 "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しな"
12683 "くてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外"
12684 "である)。 これがデフォルトのロック形式である。"
12685
12686 #. type: TP
12687 #: build/C/man3/stdio_ext.3:109
12688 #, no-wrap
12689 msgid "B<FSETLOCKING_BYCALLER>"
12690 msgstr "B<FSETLOCKING_BYCALLER>"
12691
12692 #. type: Plain text
12693 #: build/C/man3/stdio_ext.3:116
12694 msgid ""
12695 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
12696 "case there is more than one thread), and the stdio routines will not do "
12697 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
12698 msgstr ""
12699 "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状"
12700 "況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が "
12701 "B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処"
12702 "理を行わない。"
12703
12704 #. type: TP
12705 #: build/C/man3/stdio_ext.3:116
12706 #, no-wrap
12707 msgid "B<FSETLOCKING_QUERY>"
12708 msgstr "B<FSETLOCKING_QUERY>"
12709
12710 #. type: Plain text
12711 #: build/C/man3/stdio_ext.3:120
12712 msgid "Don't change the type of locking.  (Only return it.)"
12713 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
12714
12715 #. type: Plain text
12716 #: build/C/man3/stdio_ext.3:126
12717 msgid ""
12718 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
12719 "so that output to a terminal is forced out, say before reading keyboard "
12720 "input.)"
12721 msgstr ""
12722 "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのスト"
12723 "リームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行わ"
12724 "れることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がい"
12725 "いだろう)"
12726
12727 #. type: Plain text
12728 #: build/C/man3/stdio_ext.3:130
12729 msgid ""
12730 "The B<__fpurge>()  function discards the contents of the stream's buffer."
12731 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
12732
12733 #. type: Plain text
12734 #: build/C/man3/stdio_ext.3:133
12735 msgid "B<flockfile>(3), B<fpurge>(3)"
12736 msgstr "B<flockfile>(3), B<fpurge>(3)"
12737
12738 #. type: TH
12739 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:35
12740 #, no-wrap
12741 msgid "SYMLINK"
12742 msgstr "SYMLINK"
12743
12744 #. type: TH
12745 #: build/C/man2/symlink.2:32
12746 #, no-wrap
12747 msgid "2010-09-20"
12748 msgstr "2010-09-20"
12749
12750 #. type: Plain text
12751 #: build/C/man2/symlink.2:35
12752 msgid "symlink - make a new name for a file"
12753 msgstr "symlink - ファイルに新しい名前を付ける"
12754
12755 #. type: Plain text
12756 #: build/C/man2/symlink.2:39
12757 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
12758 msgstr "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
12759
12760 #. type: Plain text
12761 #: build/C/man2/symlink.2:47
12762 msgid "B<symlink>():"
12763 msgstr "B<symlink>():"
12764
12765 #. type: Plain text
12766 #: build/C/man2/symlink.2:58
12767 msgid ""
12768 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
12769 "string I<oldpath>."
12770 msgstr ""
12771 "B<symlink>()  は I<oldpath> という文字列をファイルの内容として持つ "
12772 "I<newpath> というシンボリックリンク (symbolic link) を作成する。"
12773
12774 #. type: Plain text
12775 #: build/C/man2/symlink.2:62
12776 msgid ""
12777 "Symbolic links are interpreted at run time as if the contents of the link "
12778 "had been substituted into the path being followed to find a file or "
12779 "directory."
12780 msgstr ""
12781 "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパ"
12782 "スを辿ることで、 ファイルやディレクトリに到達する。"
12783
12784 #. type: Plain text
12785 #: build/C/man2/symlink.2:67
12786 msgid ""
12787 "Symbolic links may contain I<..> path components, which (if used at the "
12788 "start of the link) refer to the parent directories of that in which the link "
12789 "resides."
12790 msgstr ""
12791 "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンク"
12792 "の最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照"
12793 "される。"
12794
12795 #. type: Plain text
12796 #: build/C/man2/symlink.2:71
12797 msgid ""
12798 "A symbolic link (also known as a soft link) may point to an existing file or "
12799 "to a nonexistent one; the latter case is known as a dangling link."
12800 msgstr ""
12801 "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイル"
12802 "を指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者"
12803 "の場合は壊れたリンク (dangling link) とも呼ばれる。"
12804
12805 #. type: Plain text
12806 #: build/C/man2/symlink.2:78
12807 msgid ""
12808 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
12809 "when following the link, but is checked when removal or renaming of the link "
12810 "is requested and the link is in a directory with the sticky bit "
12811 "(B<S_ISVTX>)  set."
12812 msgstr ""
12813 "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合に"
12814 "は所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求さ"
12815 "れ、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  "
12816 "(B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
12817
12818 #. type: Plain text
12819 #: build/C/man2/symlink.2:99
12820 msgid ""
12821 "Write access to the directory containing I<newpath> is denied, or one of the "
12822 "directories in the path prefix of I<newpath> did not allow search "
12823 "permission.  (See also B<path_resolution>(7).)"
12824 msgstr ""
12825 "I<newpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<newpath> に"
12826 "含まれているディレクトリのどれかに検索許可が与えられていない "
12827 "(B<path_resolution>(7)  も参照すること)。"
12828
12829 #. type: Plain text
12830 #: build/C/man2/symlink.2:113
12831 msgid "Too many symbolic links were encountered in resolving I<newpath>."
12832 msgstr "I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
12833
12834 #. type: Plain text
12835 #: build/C/man2/symlink.2:123
12836 msgid ""
12837 "A directory component in I<newpath> does not exist or is a dangling symbolic "
12838 "link, or I<oldpath> is the empty string."
12839 msgstr ""
12840 "I<newpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 "
12841 "I<oldpath> が空文字列である。"
12842
12843 #. type: Plain text
12844 #: build/C/man2/symlink.2:135
12845 msgid ""
12846 "A component used as a directory in I<newpath> is not, in fact, a directory."
12847 msgstr ""
12848 "I<newpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
12849
12850 #. type: Plain text
12851 #: build/C/man2/symlink.2:140
12852 msgid ""
12853 "The file system containing I<newpath> does not support the creation of "
12854 "symbolic links."
12855 msgstr ""
12856 "I<newpath> を含んでいるファイルシステム (file system) が シンボリックリンクの"
12857 "作成をサポートしていない。"
12858
12859 #. type: Plain text
12860 #: build/C/man2/symlink.2:144
12861 msgid "I<newpath> is on a read-only file system."
12862 msgstr "I<newpath> が読み込み専用のファイルシステムに存在している。"
12863
12864 #. type: Plain text
12865 #: build/C/man2/symlink.2:154
12866 msgid "No checking of I<oldpath> is done."
12867 msgstr "I<oldpath> についてのチェックは行なわれない。"
12868
12869 #. type: Plain text
12870 #: build/C/man2/symlink.2:159
12871 msgid ""
12872 "Deleting the name referred to by a symlink will actually delete the file "
12873 "(unless it also has other hard links).  If this behavior is not desired, use "
12874 "B<link>(2)."
12875 msgstr ""
12876 "symlink によって参照される名前を削除すると (それが他にハードリンク (hard "
12877 "link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない"
12878 "場合は、 B<link>(2)  を使用すること。"
12879
12880 #. type: Plain text
12881 #: build/C/man2/symlink.2:171
12882 msgid ""
12883 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
12884 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
12885 "B<symlink>(7)"
12886 msgstr ""
12887 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
12888 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
12889 "B<symlink>(7)"
12890
12891 #. type: TH
12892 #: build/C/man7/symlink.7:35
12893 #, no-wrap
12894 msgid "2008-06-18"
12895 msgstr "2008-06-18"
12896
12897 #. type: Plain text
12898 #: build/C/man7/symlink.7:38
12899 msgid "symlink - symbolic link handling"
12900 msgstr ""
12901
12902 #. type: SH
12903 #: build/C/man7/symlink.7:38
12904 #, no-wrap
12905 msgid "SYMBOLIC LINK HANDLING"
12906 msgstr ""
12907
12908 #. type: Plain text
12909 #: build/C/man7/symlink.7:42
12910 msgid ""
12911 "Symbolic links are files that act as pointers to other files.  To understand "
12912 "their behavior, you must first understand how hard links work."
12913 msgstr ""
12914
12915 #. type: Plain text
12916 #: build/C/man7/symlink.7:58
12917 msgid ""
12918 "A hard link to a file is indistinguishable from the original file because it "
12919 "is a reference to the object underlying the original filename.  (To be "
12920 "precise: each of the hard links to a file is a reference to the same I<i-"
12921 "node number>, where an i-node number is an index into the i-node table, "
12922 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
12923 "Changes to a file are independent of the name used to reference the file.  "
12924 "Hard links may not refer to directories (to prevent the possibility of loops "
12925 "within the file system tree, which would confuse many programs)  and may not "
12926 "refer to files on different file systems (because i-node numbers are not "
12927 "unique across file systems)."
12928 msgstr ""
12929
12930 #. type: Plain text
12931 #: build/C/man7/symlink.7:65
12932 msgid ""
12933 "A symbolic link is a special type of file whose contents are a string that "
12934 "is the pathname another file, the file to which the link refers.  In other "
12935 "words, a symbolic link is a pointer to another name, and not to an "
12936 "underlying object.  For this reason, symbolic links may refer to directories "
12937 "and may cross file system boundaries."
12938 msgstr ""
12939
12940 #. type: Plain text
12941 #: build/C/man7/symlink.7:71
12942 msgid ""
12943 "There is no requirement that the pathname referred to by a symbolic link "
12944 "should exist.  A symbolic link that refers to a pathname that does not exist "
12945 "is said to be a I<dangling link>."
12946 msgstr ""
12947
12948 #. type: Plain text
12949 #: build/C/man7/symlink.7:83
12950 msgid ""
12951 "Because a symbolic link and its referenced object coexist in the file system "
12952 "name space, confusion can arise in distinguishing between the link itself "
12953 "and the referenced object.  On historical systems, commands and system calls "
12954 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
12955 "Rules for a more uniform approach, as they are implemented on Linux and "
12956 "other systems, are outlined here.  It is important that site-local "
12957 "applications also conform to these rules, so that the user interface can be "
12958 "as consistent as possible."
12959 msgstr ""
12960
12961 #. type: SS
12962 #: build/C/man7/symlink.7:83
12963 #, no-wrap
12964 msgid "Symbolic link ownership, permissions, and timestamps"
12965 msgstr ""
12966
12967 #. type: Plain text
12968 #: build/C/man7/symlink.7:91
12969 msgid ""
12970 "The owner and group of an existing symbolic link can be changed using "
12971 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
12972 "is when the link is being removed or renamed in a directory that has the "
12973 "sticky bit set (see B<stat>(2))."
12974 msgstr ""
12975
12976 #. type: Plain text
12977 #: build/C/man7/symlink.7:97
12978 msgid ""
12979 "The last access and last modification timestamps of a symbolic link can be "
12980 "changed using B<utimensat>(2)  or B<lutimes>(3)."
12981 msgstr ""
12982
12983 #.  Linux does not currently implement an lchmod(2).
12984 #.  The
12985 #.  4.4BSD
12986 #.  system differs from historical
12987 #.  4BSD
12988 #.  systems in that the system call
12989 #.  .BR chown (2)
12990 #.  has been changed to follow symbolic links.
12991 #.  The
12992 #.  .BR lchown (2)
12993 #.  system call was added later when the limitations of the new
12994 #.  .BR chown (2)
12995 #.  became apparent.
12996 #. type: Plain text
12997 #: build/C/man7/symlink.7:116
12998 msgid ""
12999 "On Linux, the permissions of a symbolic link are not used in any operations; "
13000 "the permissions are always 0777 (read, write, and execute for all user "
13001 "categories), and can't be changed."
13002 msgstr ""
13003
13004 #. type: SS
13005 #: build/C/man7/symlink.7:116
13006 #, no-wrap
13007 msgid "Handling of symbolic links by system calls and commands"
13008 msgstr ""
13009
13010 #. type: Plain text
13011 #: build/C/man7/symlink.7:131
13012 msgid ""
13013 "Symbolic links are handled either by operating on the link itself, or by "
13014 "operating on the object referred to by the link.  In the latter case, an "
13015 "application or system call is said to I<follow> the link.  Symbolic links "
13016 "may refer to other symbolic links, in which case the links are dereferenced "
13017 "until an object that is not a symbolic link is found, a symbolic link that "
13018 "refers to a file which does not exist is found, or a loop is detected.  "
13019 "(Loop detection is done by placing an upper limit on the number of links "
13020 "that may be followed, and an error results if this limit is exceeded.)"
13021 msgstr ""
13022
13023 #. type: Plain text
13024 #: build/C/man7/symlink.7:134
13025 msgid ""
13026 "There are three separate areas that need to be discussed.  They are as "
13027 "follows:"
13028 msgstr ""
13029
13030 #. type: IP
13031 #: build/C/man7/symlink.7:134
13032 #, no-wrap
13033 msgid "1."
13034 msgstr "1."
13035
13036 #. type: Plain text
13037 #: build/C/man7/symlink.7:136
13038 msgid "Symbolic links used as filename arguments for system calls."
13039 msgstr ""
13040
13041 #. type: IP
13042 #: build/C/man7/symlink.7:136
13043 #, no-wrap
13044 msgid "2."
13045 msgstr "2."
13046
13047 #. type: Plain text
13048 #: build/C/man7/symlink.7:139
13049 msgid ""
13050 "Symbolic links specified as command-line arguments to utilities that are not "
13051 "traversing a file tree."
13052 msgstr ""
13053
13054 #. type: IP
13055 #: build/C/man7/symlink.7:139
13056 #, no-wrap
13057 msgid "3."
13058 msgstr "3."
13059
13060 #. type: Plain text
13061 #: build/C/man7/symlink.7:143
13062 msgid ""
13063 "Symbolic links encountered by utilities that are traversing a file tree "
13064 "(either specified on the command line or encountered as part of the file "
13065 "hierarchy walk)."
13066 msgstr ""
13067
13068 #. type: SS
13069 #: build/C/man7/symlink.7:143
13070 #, no-wrap
13071 msgid "System calls"
13072 msgstr ""
13073
13074 #. type: Plain text
13075 #: build/C/man7/symlink.7:146
13076 msgid ""
13077 "The first area is symbolic links used as filename arguments for system calls."
13078 msgstr ""
13079
13080 #. type: Plain text
13081 #: build/C/man7/symlink.7:156
13082 msgid ""
13083 "Except as noted below, all system calls follow symbolic links.  For example, "
13084 "if there were a symbolic link I<slink> which pointed to a file named "
13085 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
13086 "descriptor referring to the file I<afile>."
13087 msgstr ""
13088
13089 #.  Maybe one day: .BR fchownat (2)
13090 #. type: Plain text
13091 #: build/C/man7/symlink.7:206
13092 msgid ""
13093 "Various system calls do not follow links, and operate on the symbolic link "
13094 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
13095 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>"
13096 "(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls optionally "
13097 "follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>"
13098 "(2), B<linkat>(2), B<open>(2), B<openat>(2), and B<utimensat>(2); see their "
13099 "manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>"
13100 "(2), that library function also does not follow symbolic links.  When "
13101 "B<rmdir>(2)  is applied to a symbolic link, it fails with the error "
13102 "B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  POSIX.1-2001 "
13103 "specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic "
13104 "link.  However, Linux does not do this.  (By default Solaris is the same, "
13105 "but the POSIX.1-2001 specified behavior can be obtained with suitable "
13106 "compiler options.)  The upcoming POSIX.1 revision changes the specification "
13107 "to allow either behavior in an implementation."
13108 msgstr ""
13109
13110 #. type: SS
13111 #: build/C/man7/symlink.7:206
13112 #, no-wrap
13113 msgid "Commands not traversing a file tree"
13114 msgstr ""
13115
13116 #. type: Plain text
13117 #: build/C/man7/symlink.7:209
13118 msgid ""
13119 "The second area is symbolic links, specified as command-line filename "
13120 "arguments, to commands which are not traversing a file tree."
13121 msgstr ""
13122
13123 #. type: Plain text
13124 #: build/C/man7/symlink.7:220
13125 msgid ""
13126 "Except as noted below, commands follow symbolic links named as command-line "
13127 "arguments.  For example, if there were a symbolic link I<slink> which "
13128 "pointed to a file named I<afile>, the command I<cat slink> would display the "
13129 "contents of the file I<afile>."
13130 msgstr ""
13131
13132 #. type: Plain text
13133 #: build/C/man7/symlink.7:228
13134 msgid ""
13135 "It is important to realize that this rule includes commands which may "
13136 "optionally traverse file trees, e.g., the command I<chown file> is included "
13137 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
13138 "traversal, is not.  (The latter is described in the third area, below.)"
13139 msgstr ""
13140
13141 #. type: Plain text
13142 #: build/C/man7/symlink.7:246
13143 msgid ""
13144 "If it is explicitly intended that the command operate on the symbolic link "
13145 "instead of following the symbolic link, e.g., it is desired that I<chown "
13146 "slink> change the ownership of the file that I<slink> is, whether it is a "
13147 "symbolic link or not, the I<-h> option should be used.  In the above "
13148 "example, I<chown root slink> would change the ownership of the file referred "
13149 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
13150 "I<slink> itself."
13151 msgstr ""
13152
13153 #. type: Plain text
13154 #: build/C/man7/symlink.7:248
13155 msgid "There are some exceptions to this rule:"
13156 msgstr ""
13157
13158 #. type: Plain text
13159 #: build/C/man7/symlink.7:258
13160 msgid ""
13161 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
13162 "arguments, but respectively attempt to rename and delete them.  (Note, if "
13163 "the symbolic link references a file via a relative path, moving it to "
13164 "another directory may very well cause it to stop working, since the path may "
13165 "no longer be correct.)"
13166 msgstr ""
13167
13168 #. type: Plain text
13169 #: build/C/man7/symlink.7:288
13170 msgid ""
13171 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
13172 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the I<-"
13173 "R> option is not specified), the B<ls>(1)  command follows symbolic links "
13174 "named as arguments if the I<-H> or I<-L> option is specified, or if the I<-"
13175 "F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
13176 "the only command where the I<-H> and I<-L> options affect its behavior even "
13177 "though it is not doing a walk of a file tree.)"
13178 msgstr ""
13179
13180 #. The 4.4BSD system differs from historical 4BSD systems in that the
13181 #. .BR chown (1)
13182 #. and
13183 #. .BR chgrp (1)
13184 #. commands follow symbolic links specified on the command line.
13185 #. type: Plain text
13186 #: build/C/man7/symlink.7:306
13187 msgid ""
13188 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
13189 "command does not follow symbolic links named as argument by default.  The "
13190 "B<file>(1)  command does follow symbolic links named as argument if the I<-"
13191 "L> option is specified."
13192 msgstr ""
13193
13194 #. type: SS
13195 #: build/C/man7/symlink.7:306
13196 #, no-wrap
13197 msgid "Commands traversing a file tree"
13198 msgstr ""
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
13208 #. type: Plain text
13209 #: build/C/man7/symlink.7:323
13210 msgid ""
13211 "It is important to realize that the following rules apply equally to "
13212 "symbolic links encountered during the file tree traversal and symbolic links "
13213 "listed as command-line arguments."
13214 msgstr ""
13215
13216 #. type: Plain text
13217 #: build/C/man7/symlink.7:328
13218 msgid ""
13219 "The I<first rule> applies to symbolic links that reference files other than "
13220 "directories.  Operations that apply to symbolic links are performed on the "
13221 "links themselves, but otherwise the links are ignored."
13222 msgstr ""
13223
13224 #. type: Plain text
13225 #: build/C/man7/symlink.7:340
13226 msgid ""
13227 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
13228 "symbolic links encountered in the tree traversal of I<directory>, because "
13229 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
13230 "referred to by I<slink>."
13231 msgstr ""
13232
13233 #. type: Plain text
13234 #: build/C/man7/symlink.7:345
13235 msgid ""
13236 "The I<second rule> applies to symbolic links that refer to directories.  "
13237 "Symbolic links that refer to directories are never followed by default.  "
13238 "This is often referred to as a \"physical\" walk, as opposed to a \"logical"
13239 "\" walk (where symbolic links the refer to directories are followed)."
13240 msgstr ""
13241
13242 #. type: Plain text
13243 #: build/C/man7/symlink.7:348
13244 msgid ""
13245 "Certain conventions are (should be) followed as consistently as possible by "
13246 "commands that perform file tree walks:"
13247 msgstr ""
13248
13249 #. type: Plain text
13250 #: build/C/man7/symlink.7:361
13251 msgid ""
13252 "A command can be made to follow any symbolic links named on the command "
13253 "line, regardless of the type of file they reference, by specifying the I<-H> "
13254 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
13255 "name space look like the logical name space.  (Note, for commands that do "
13256 "not always do file tree traversals, the I<-H> flag will be ignored if the I<-"
13257 "R> flag is not also specified.)"
13258 msgstr ""
13259
13260 #. type: Plain text
13261 #: build/C/man7/symlink.7:377
13262 msgid ""
13263 "For example, the command I<chown\\ -HR user slink> will traverse the file "
13264 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
13265 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
13266 "symbolic links specified on the command line to be dereferenced for the "
13267 "purposes of both the action to be performed and the tree walk, and it is as "
13268 "if the user had specified the name of the file to which the symbolic link "
13269 "pointed."
13270 msgstr ""
13271
13272 #. type: Plain text
13273 #: build/C/man7/symlink.7:391
13274 msgid ""
13275 "A command can be made to follow any symbolic links named on the command "
13276 "line, as well as any symbolic links encountered during the traversal, "
13277 "regardless of the type of file they reference, by specifying the I<-L> (for "
13278 "\"logical\") flag.  This flag is intended to make the entire name space look "
13279 "like the logical name space.  (Note, for commands that do not always do file "
13280 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
13281 "also specified.)"
13282 msgstr ""
13283
13284 #. type: Plain text
13285 #: build/C/man7/symlink.7:406
13286 msgid ""
13287 "For example, the command I<chown\\ -LR user slink> will change the owner of "
13288 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
13289 "B<chown> will traverse the file hierarchy rooted in the directory that it "
13290 "references.  In addition, if any symbolic links are encountered in any file "
13291 "tree that B<chown> traverses, they will be treated in the same fashion as "
13292 "I<slink>."
13293 msgstr ""
13294
13295 #. type: Plain text
13296 #: build/C/man7/symlink.7:413
13297 msgid ""
13298 "A command can be made to provide the default behavior by specifying the I<-"
13299 "P> (for \"physical\") flag.  This flag is intended to make the entire name "
13300 "space look like the physical name space."
13301 msgstr ""
13302
13303 #. type: Plain text
13304 #: build/C/man7/symlink.7:431
13305 msgid ""
13306 "For commands that do not by default do file tree traversals, the I<-H>, I<-"
13307 "L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In "
13308 "addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
13309 "once; the last one specified determines the command's behavior.  This is "
13310 "intended to permit you to alias commands to behave one way or the other, and "
13311 "then override that behavior on the command line."
13312 msgstr ""
13313
13314 #. type: Plain text
13315 #: build/C/man7/symlink.7:437
13316 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
13317 msgstr ""
13318
13319 #. type: Plain text
13320 #: build/C/man7/symlink.7:450
13321 msgid ""
13322 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
13323 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
13324 "command does not support the I<-H>, I<-L>, or I<-P> options."
13325 msgstr ""
13326
13327 #. type: Plain text
13328 #: build/C/man7/symlink.7:470
13329 msgid ""
13330 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
13331 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
13332 "options, B<ls>(1)  will follow symbolic links specified on the command "
13333 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
13334 "regardless of their type, whether specified on the command line or "
13335 "encountered in the tree walk."
13336 msgstr ""
13337
13338 #. type: Plain text
13339 #: build/C/man7/symlink.7:488
13340 msgid ""
13341 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>"
13342 "(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), "
13343 "B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
13344 "B<path_resolution>(7)"
13345 msgstr ""
13346 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
13347 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
13348 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
13349 "B<lutimes>(3), B<path_resolution>(7)"
13350
13351 #. type: TH
13352 #: build/C/man3/tempnam.3:23
13353 #, no-wrap
13354 msgid "TEMPNAM"
13355 msgstr "TEMPNAM"
13356
13357 #. type: TH
13358 #: build/C/man3/tempnam.3:23
13359 #, no-wrap
13360 msgid "2008-08-06"
13361 msgstr "2008-08-06"
13362
13363 #. type: Plain text
13364 #: build/C/man3/tempnam.3:26
13365 msgid "tempnam - create a name for a temporary file"
13366 msgstr "tempnam - テンポラリファイルの名前を作成する"
13367
13368 #. type: Plain text
13369 #: build/C/man3/tempnam.3:31
13370 #, no-wrap
13371 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13372 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
13373
13374 #. type: Plain text
13375 #: build/C/man3/tempnam.3:40
13376 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13377 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
13378
13379 #. type: Plain text
13380 #: build/C/man3/tempnam.3:54
13381 msgid ""
13382 "The B<tempnam>()  function returns a pointer to a string that is a valid "
13383 "filename, and such that a file with this name did not exist when B<tempnam>"
13384 "()  checked.  The filename suffix of the pathname generated will start with "
13385 "I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The "
13386 "directory prefix part of the pathname generated is required to be "
13387 "\"appropriate\" (often that at least implies writable)."
13388 msgstr ""
13389 "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファ"
13390 "イル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しな"
13391 "い (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成さ"
13392 "れるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成される"
13393 "ディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」である"
13394 "ためにはまず少なくとも 書き込み可能でなければならない)。"
13395
13396 #. type: Plain text
13397 #: build/C/man3/tempnam.3:57
13398 msgid ""
13399 "Attempts to find an appropriate directory go through the following steps:"
13400 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
13401
13402 #. type: TP
13403 #: build/C/man3/tempnam.3:57
13404 #, no-wrap
13405 msgid "a)"
13406 msgstr "a)"
13407
13408 #. type: Plain text
13409 #: build/C/man3/tempnam.3:63
13410 msgid ""
13411 "In case the environment variable B<TMPDIR> exists and contains the name of "
13412 "an appropriate directory, that is used."
13413 msgstr ""
13414 "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前な"
13415 "ら、それを用いる。"
13416
13417 #. type: TP
13418 #: build/C/man3/tempnam.3:63
13419 #, no-wrap
13420 msgid "b)"
13421 msgstr "b)"
13422
13423 #. type: Plain text
13424 #: build/C/man3/tempnam.3:68
13425 msgid ""
13426 "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
13427 msgstr ""
13428 "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用い"
13429 "る。"
13430
13431 #. type: TP
13432 #: build/C/man3/tempnam.3:68
13433 #, no-wrap
13434 msgid "c)"
13435 msgstr "c)"
13436
13437 #. type: Plain text
13438 #: build/C/man3/tempnam.3:75
13439 msgid ""
13440 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
13441 "appropriate."
13442 msgstr ""
13443 "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切"
13444 "なら、それを用いる。"
13445
13446 #. type: TP
13447 #: build/C/man3/tempnam.3:75
13448 #, no-wrap
13449 msgid "d)"
13450 msgstr "d)"
13451
13452 #. type: Plain text
13453 #: build/C/man3/tempnam.3:78
13454 msgid "Finally an implementation-defined directory may be used."
13455 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
13456
13457 #. type: Plain text
13458 #: build/C/man3/tempnam.3:85
13459 msgid ""
13460 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
13461 "hence should be freed by B<free>(3)."
13462 msgstr ""
13463 "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 "
13464 "B<free>(3)  で解放すべきである。"
13465
13466 #. type: Plain text
13467 #: build/C/man3/tempnam.3:90
13468 msgid ""
13469 "The B<tempnam>()  function returns a pointer to a unique temporary filename, "
13470 "or NULL if a unique name cannot be generated."
13471 msgstr ""
13472 "B<tempnam>()  関数は他と重ならないテンポラリファイル名へのポインタを返す。 他"
13473 "と重ならない名前が生成できなければ NULL を返す。"
13474
13475 #. type: Plain text
13476 #: build/C/man3/tempnam.3:94
13477 msgid "Allocation of storage failed."
13478 msgstr "保存領域の割り当てに失敗した。"
13479
13480 #. type: Plain text
13481 #: build/C/man3/tempnam.3:99
13482 msgid ""
13483 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
13484 msgstr ""
13485 "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としてい"
13486 "る。"
13487
13488 #. type: Plain text
13489 #: build/C/man3/tempnam.3:118
13490 msgid ""
13491 "Although B<tempnam>()  generates names that are difficult to guess, it is "
13492 "nevertheless possible that between the time that B<tempnam>()  returns a "
13493 "pathname, and the time that the program opens it, another program might "
13494 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13495 "This can lead to security holes.  To avoid such possibilities, use the "
13496 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13497 "B<mkstemp>(3)  or B<tmpfile>(3)."
13498 msgstr ""
13499 "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>"
13500 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13501 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13502 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13503 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13504 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13505 "B<tmpfile>(3)  を使うことである。"
13506
13507 #. type: Plain text
13508 #: build/C/man3/tempnam.3:126
13509 msgid ""
13510 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
13511 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</"
13512 "tmp> (and this is what glibc does)."
13513 msgstr ""
13514 "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-"
13515 "user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用される"
13516 "ディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
13517
13518 #. type: Plain text
13519 #: build/C/man3/tempnam.3:131
13520 msgid ""
13521 "Because it dynamically allocates memory used to return the pathname, "
13522 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
13523 msgstr ""
13524 "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 "
13525 "B<tempnam>()  はリエントラントであり、スレッドセーフである。"
13526
13527 #. type: Plain text
13528 #: build/C/man3/tempnam.3:144
13529 msgid ""
13530 "The B<tempnam>()  function generates a different string each time it is "
13531 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
13532 "called more than B<TMP_MAX> times, the behavior is implementation defined."
13533 msgstr ""
13534 "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作"
13535 "成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし "
13536 "B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
13537
13538 #. type: Plain text
13539 #: build/C/man3/tempnam.3:148
13540 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
13541 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
13542
13543 #. type: Plain text
13544 #: build/C/man3/tempnam.3:154
13545 msgid ""
13546 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
13547 "upon failure to find a unique name."
13548 msgstr ""
13549 "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエ"
13550 "ラー B<EEXIST> で失敗する。"
13551
13552 #. type: Plain text
13553 #: build/C/man3/tempnam.3:157
13554 msgid ""
13555 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
13556 "accessibility of a directory is determined."
13557 msgstr ""
13558 "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程"
13559 "度のアクセス権限が必要なのかは指定されていない。"
13560
13561 #. type: Plain text
13562 #: build/C/man3/tempnam.3:164 build/C/man3/tmpnam.3:151
13563 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
13564 msgstr ""
13565 "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  "
13566 "を使うこと。"
13567
13568 #. type: Plain text
13569 #: build/C/man3/tempnam.3:169
13570 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13571 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
13572
13573 #. type: TH
13574 #: build/C/man3/tmpfile.3:29
13575 #, no-wrap
13576 msgid "TMPFILE"
13577 msgstr "TMPFILE"
13578
13579 #. type: Plain text
13580 #: build/C/man3/tmpfile.3:32
13581 msgid "tmpfile - create a temporary file"
13582 msgstr "tmpfile - テンポラリファイルを作成する"
13583
13584 #. type: Plain text
13585 #: build/C/man3/tmpfile.3:37
13586 #, no-wrap
13587 msgid "B<FILE *tmpfile(void);>\n"
13588 msgstr "B<FILE *tmpfile(void);>\n"
13589
13590 #. type: Plain text
13591 #: build/C/man3/tmpfile.3:45
13592 msgid ""
13593 "The B<tmpfile>()  function opens a unique temporary file in binary read/"
13594 "write (w+b) mode.  The file will be automatically deleted when it is closed "
13595 "or the program terminates."
13596 msgstr ""
13597 "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモー"
13598 "ド (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に"
13599 "自動的に削除される。"
13600
13601 #. type: Plain text
13602 #: build/C/man3/tmpfile.3:52
13603 msgid ""
13604 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
13605 "filename cannot be generated or the unique file cannot be opened.  In the "
13606 "latter case, I<errno> is set to indicate the error."
13607 msgstr ""
13608 "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかっ"
13609 "たかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す "
13610 "I<errno> を設定する。"
13611
13612 #. type: Plain text
13613 #: build/C/man3/tmpfile.3:56
13614 msgid "Search permission denied for directory in file's path prefix."
13615 msgstr ""
13616 "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
13617
13618 #. type: Plain text
13619 #: build/C/man3/tmpfile.3:59
13620 msgid "Unable to generate a unique filename."
13621 msgstr "ユニークなファイル名が作成できなかった。"
13622
13623 #. type: Plain text
13624 #: build/C/man3/tmpfile.3:62
13625 msgid "The call was interrupted by a signal."
13626 msgstr "呼び出しがシグナルによって中断された。"
13627
13628 #. type: Plain text
13629 #: build/C/man3/tmpfile.3:65
13630 msgid "Too many file descriptors in use by the process."
13631 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
13632
13633 #. type: Plain text
13634 #: build/C/man3/tmpfile.3:68
13635 msgid "Too many files open in the system."
13636 msgstr "システム全体でオープン可能なファイル数を超過した。"
13637
13638 #. type: Plain text
13639 #: build/C/man3/tmpfile.3:71
13640 msgid "There was no room in the directory to add the new filename."
13641 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
13642
13643 #. type: Plain text
13644 #: build/C/man3/tmpfile.3:74
13645 msgid "Read-only file system."
13646 msgstr "読みだし専用ファイルシステムである。"
13647
13648 #. type: Plain text
13649 #: build/C/man3/tmpfile.3:76
13650 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
13651 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
13652
13653 #. type: Plain text
13654 #: build/C/man3/tmpfile.3:80
13655 msgid ""
13656 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
13657 "stream cannot be opened."
13658 msgstr ""
13659 "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラー"
13660 "メッセージが書き出される、と規定されている。"
13661
13662 #. type: Plain text
13663 #: build/C/man3/tmpfile.3:86
13664 msgid ""
13665 "The standard does not specify the directory that B<tmpfile>()  will use.  "
13666 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
13667 "and if that fails the directory I</tmp>."
13668 msgstr ""
13669 "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では "
13670 "I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとす"
13671 "る。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
13672
13673 #. type: Plain text
13674 #: build/C/man3/tmpfile.3:92
13675 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
13676 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
13677
13678 #. type: TH
13679 #: build/C/man3/tmpnam.3:25
13680 #, no-wrap
13681 msgid "TMPNAM"
13682 msgstr "TMPNAM"
13683
13684 #. type: TH
13685 #: build/C/man3/tmpnam.3:25
13686 #, no-wrap
13687 msgid "2010-09-10"
13688 msgstr "2010-09-10"
13689
13690 #. type: Plain text
13691 #: build/C/man3/tmpnam.3:28
13692 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
13693 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
13694
13695 #. type: Plain text
13696 #: build/C/man3/tmpnam.3:33
13697 #, no-wrap
13698 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
13699 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
13700
13701 #. type: Plain text
13702 #: build/C/man3/tmpnam.3:56
13703 msgid ""
13704 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
13705 "filename, and such that a file with this name did not exist at some point in "
13706 "time, so that naive programmers may think it a suitable name for a temporary "
13707 "file.  If the argument I<s> is NULL this name is generated in an internal "
13708 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
13709 "I<s> is not NULL, the name is copied to the character array (of length at "
13710 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
13711 "case of success."
13712 msgstr ""
13713 "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点で"
13714 "は同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラ"
13715 "マはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれな"
13716 "い。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に "
13717 "B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、"
13718 "ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコ"
13719 "ピーされ、 成功した場合は I<s> が返される。"
13720
13721 #. type: Plain text
13722 #: build/C/man3/tmpnam.3:68
13723 msgid ""
13724 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
13725 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
13726 "the B<TMP_MAX> mentioned below.)"
13727 msgstr ""
13728 "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 "
13729 "(I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio."
13730 "hE<gt>> で定義されている。)"
13731
13732 #. type: Plain text
13733 #: build/C/man3/tmpnam.3:73
13734 msgid ""
13735 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
13736 "or NULL if a unique name cannot be generated."
13737 msgstr ""
13738 "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名"
13739 "が作成できなかった場合は NULL を返す。"
13740
13741 #. type: Plain text
13742 #: build/C/man3/tmpnam.3:75
13743 msgid "No errors are defined."
13744 msgstr "エラーは定義されていない。"
13745
13746 #. type: Plain text
13747 #: build/C/man3/tmpnam.3:80
13748 msgid ""
13749 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
13750 "obsolete."
13751 msgstr ""
13752 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予"
13753 "定としている。"
13754
13755 #. type: Plain text
13756 #: build/C/man3/tmpnam.3:91
13757 msgid ""
13758 "The B<tmpnam>()  function generates a different string each time it is "
13759 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
13760 "the behavior is implementation defined."
13761 msgstr ""
13762 "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成"
13763 "する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
13764
13765 #. type: Plain text
13766 #: build/C/man3/tmpnam.3:110
13767 msgid ""
13768 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
13769 "nevertheless possible that between the time that B<tmpnam>()  returns a "
13770 "pathname, and the time that the program opens it, another program might "
13771 "create that pathname using B<open>(2), or create it as a symbolic link.  "
13772 "This can lead to security holes.  To avoid such possibilities, use the "
13773 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
13774 "B<mkstemp>(3)  or B<tmpfile>(3)."
13775 msgstr ""
13776 "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>"
13777 "()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、"
13778 "別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリッ"
13779 "クリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能"
13780 "性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラ"
13781 "グを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や "
13782 "B<tmpfile>(3)  を使うことである。"
13783
13784 #. type: Plain text
13785 #: build/C/man3/tmpnam.3:118
13786 msgid ""
13787 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
13788 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
13789 "defined."
13790 msgstr ""
13791 "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か "
13792 "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を "
13793 "NULL 引き数で呼び出してはならない。"
13794
13795 #. type: Plain text
13796 #: build/C/man3/tmpnam.3:122
13797 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
13798 msgstr ""
13799 "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以"
13800 "下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別"
13801 "扱いしている。"
13802
13803 #. type: Plain text
13804 #: build/C/man3/tmpnam.3:130
13805 #, no-wrap
13806 msgid ""
13807 "char *\n"
13808 "tmpnam_r(char *s)\n"
13809 "{\n"
13810 "    return s ? tmpnam(s) : NULL;\n"
13811 "}\n"
13812 msgstr ""
13813 "char *\n"
13814 "tmpnam_r(char *s)\n"
13815 "{\n"
13816 "    return s ? tmpnam(s) : NULL;\n"
13817 "}\n"
13818
13819 #. type: Plain text
13820 #: build/C/man3/tmpnam.3:144
13821 msgid ""
13822 "apparently as a warning not to use NULL.  A few systems implement it.  To "
13823 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
13824 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
13825 msgstr ""
13826 "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロ"
13827 "トタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをイン"
13828 "クルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要"
13829 "がある。"
13830
13831 #. type: Plain text
13832 #: build/C/man3/tmpnam.3:156
13833 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
13834 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
13835
13836 #. type: TH
13837 #: build/C/man2/unlink.2:32
13838 #, no-wrap
13839 msgid "UNLINK"
13840 msgstr "UNLINK"
13841
13842 #. type: TH
13843 #: build/C/man2/unlink.2:32
13844 #, no-wrap
13845 msgid "2011-09-15"
13846 msgstr "2011-09-15"
13847
13848 #. type: Plain text
13849 #: build/C/man2/unlink.2:35
13850 msgid "unlink - delete a name and possibly the file it refers to"
13851 msgstr ""
13852 "unlink - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
13853
13854 #. type: Plain text
13855 #: build/C/man2/unlink.2:39
13856 msgid "B<int unlink(const char *>I<pathname>B<);>"
13857 msgstr "B<int unlink(const char *>I<pathname>B<);>"
13858
13859 #. type: Plain text
13860 #: build/C/man2/unlink.2:45
13861 msgid ""
13862 "B<unlink>()  deletes a name from the file system.  If that name was the last "
13863 "link to a file and no processes have the file open the file is deleted and "
13864 "the space it was using is made available for reuse."
13865 msgstr ""
13866 "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへ"
13867 "の最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) し"
13868 "ていなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域"
13869 "は再利用が可能になる。"
13870
13871 #. type: Plain text
13872 #: build/C/man2/unlink.2:49
13873 msgid ""
13874 "If the name was the last link to a file but any processes still have the "
13875 "file open the file will remain in existence until the last file descriptor "
13876 "referring to it is closed."
13877 msgstr ""
13878 "もし削除する名前がファイルへの最後のリンクだが、どれかのプロセスが そのファイ"
13879 "ルをまだオープンしている場合は、 そのファイルを参照している最後のファイルディ"
13880 "スクリプタ (file descriptor)  がクローズ (close) されるまでファイルは存在し続"
13881 "ける。"
13882
13883 #. type: Plain text
13884 #: build/C/man2/unlink.2:51
13885 msgid "If the name referred to a symbolic link the link is removed."
13886 msgstr ""
13887 "もしその名前がシンボリックリンク (symbolic link) を参照していれば、 リンクは"
13888 "削除される。"
13889
13890 #. type: Plain text
13891 #: build/C/man2/unlink.2:55
13892 msgid ""
13893 "If the name referred to a socket, fifo or device the name for it is removed "
13894 "but processes which have the object open may continue to use it."
13895 msgstr ""
13896 "もし名前がソケット (socket) や fifo やデバイス (device) を参照していれば 名前"
13897 "は削除されるがそのオブジェクトをオープンしていたプロセスは それを使い続けるこ"
13898 "とができる。"
13899
13900 #. type: Plain text
13901 #: build/C/man2/unlink.2:71
13902 msgid ""
13903 "Write access to the directory containing I<pathname> is not allowed for the "
13904 "process's effective UID, or one of the directories in I<pathname> did not "
13905 "allow search permission.  (See also B<path_resolution>(7).)"
13906 msgstr ""
13907 "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 "
13908 "(effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクト"
13909 "リのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照するこ"
13910 "と)。"
13911
13912 #. type: Plain text
13913 #: build/C/man2/unlink.2:80
13914 msgid ""
13915 "The file I<pathname> cannot be unlinked because it is being used by the "
13916 "system or another process; for example, it is a mount point or the NFS "
13917 "client software created it to represent an active but otherwise nameless "
13918 "inode (\"NFS silly renamed\")."
13919 msgstr ""
13920 "システムか別のプロセスがそのファイルを使用中のため、\n"
13921 "ファイル I<pathname> を unlink できない。\n"
13922 "例えば、そのファイルがマウントポイントの場合や、\n"
13923 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
13924 "名前なし inode (nameless inode) であることを示すために作成した\n"
13925 "場合 (\"NFS silly renamed\") などがある。"
13926
13927 #. type: Plain text
13928 #: build/C/man2/unlink.2:92
13929 msgid ""
13930 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
13931 "Linux since 2.1.132.)"
13932 msgstr ""
13933 "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値"
13934 "で、Linux 2.1.132 以降で返される。)"
13935
13936 #. type: Plain text
13937 #: build/C/man2/unlink.2:96
13938 msgid "Too many symbolic links were encountered in translating I<pathname>."
13939 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
13940
13941 #. type: Plain text
13942 #: build/C/man2/unlink.2:106
13943 msgid ""
13944 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
13945 "I<pathname> is empty."
13946 msgstr ""
13947 "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 "
13948 "I<pathname> が空である。"
13949
13950 #. type: Plain text
13951 #: build/C/man2/unlink.2:114
13952 msgid ""
13953 "A component used as a directory in I<pathname> is not, in fact, a directory."
13954 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
13955
13956 #. type: Plain text
13957 #: build/C/man2/unlink.2:123
13958 msgid ""
13959 "The system does not allow unlinking of directories, or unlinking of "
13960 "directories requires privileges that the calling process doesn't have.  "
13961 "(This is the POSIX prescribed error return; as noted above, Linux returns "
13962 "B<EISDIR> for this case.)"
13963 msgstr ""
13964 "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクト"
13965 "リに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていな"
13966 "い。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場"
13967 "合には Linux は B<EISDIR> を返す。)"
13968
13969 #. type: TP
13970 #: build/C/man2/unlink.2:123
13971 #, no-wrap
13972 msgid "B<EPERM> (Linux only)"
13973 msgstr "B<EPERM> (Linux のみ)"
13974
13975 #. type: Plain text
13976 #: build/C/man2/unlink.2:126
13977 msgid "The file system does not allow unlinking of files."
13978 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
13979
13980 #. type: Plain text
13981 #: build/C/man2/unlink.2:137
13982 msgid ""
13983 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
13984 "and the process's effective UID is neither the UID of the file to be deleted "
13985 "nor that of the directory containing it, and the process is not privileged "
13986 "(Linux: does not have the B<CAP_FOWNER> capability)."
13987 msgstr ""
13988 "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  "
13989 "(B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとする"
13990 "ファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセス"
13991 "に特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
13992
13993 #. type: Plain text
13994 #: build/C/man2/unlink.2:141
13995 msgid "I<pathname> refers to a file on a read-only file system."
13996 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
13997
13998 #. type: Plain text
13999 #: build/C/man2/unlink.2:161
14000 msgid ""
14001 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14002 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14003 "(7), B<symlink>(7)"
14004 msgstr ""
14005 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
14006 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>"
14007 "(7), B<symlink>(7)"
14008
14009 #. type: TH
14010 #: build/C/man3/unlocked_stdio.3:23
14011 #, no-wrap
14012 msgid "UNLOCKED_STDIO"
14013 msgstr "UNLOCKED_STDIO"
14014
14015 #. type: Plain text
14016 #: build/C/man3/unlocked_stdio.3:27
14017 msgid ""
14018 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
14019 "nonlocking stdio functions"
14020 msgstr ""
14021 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行"
14022 "わずに標準入出力を行う関数群"
14023
14024 #. type: Plain text
14025 #: build/C/man3/unlocked_stdio.3:35
14026 #, no-wrap
14027 msgid ""
14028 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14029 "B<int getchar_unlocked(void);>\n"
14030 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14031 "B<int putchar_unlocked(int >I<c>B<);>\n"
14032 msgstr ""
14033 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
14034 "B<int getchar_unlocked(void);>\n"
14035 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14036 "B<int putchar_unlocked(int >I<c>B<);>\n"
14037
14038 #. type: Plain text
14039 #: build/C/man3/unlocked_stdio.3:47
14040 #, no-wrap
14041 msgid ""
14042 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14043 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14044 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14045 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14046 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14047 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14048 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14049 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14050 "B<                      FILE *>I<stream>B<);>\n"
14051 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14052 "B<                      FILE *>I<stream>B<);>\n"
14053 msgstr ""
14054 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
14055 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
14056 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
14057 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
14058 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
14059 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
14060 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
14061 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14062 "B<                      FILE *>I<stream>B<);>\n"
14063 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
14064 "B<                      FILE *>I<stream>B<);>\n"
14065
14066 #. type: Plain text
14067 #: build/C/man3/unlocked_stdio.3:50
14068 #, no-wrap
14069 msgid ""
14070 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14071 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14072 msgstr ""
14073 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14074 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
14075
14076 #. type: Plain text
14077 #: build/C/man3/unlocked_stdio.3:61
14078 #, no-wrap
14079 msgid ""
14080 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14081 "B<wint_t getwchar_unlocked(void);>\n"
14082 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14083 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14084 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14085 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14086 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14087 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14088 msgstr ""
14089 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
14090 "B<wint_t getwchar_unlocked(void);>\n"
14091 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
14092 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14093 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
14094 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
14095 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
14096 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
14097
14098 #. type: Plain text
14099 #: build/C/man3/unlocked_stdio.3:73
14100 msgid ""
14101 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14102 "B<putchar_unlocked>():"
14103 msgstr ""
14104 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14105 "B<putchar_unlocked>():"
14106
14107 #. type: Plain text
14108 #: build/C/man3/unlocked_stdio.3:76
14109 msgid ""
14110 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14111 "_BSD_SOURCE || _SVID_SOURCE"
14112 msgstr ""
14113 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
14114 "_BSD_SOURCE || _SVID_SOURCE"
14115
14116 #. type: Plain text
14117 #: build/C/man3/unlocked_stdio.3:87
14118 msgid ""
14119 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14120 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14121 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14122 msgstr ""
14123 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
14124 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
14125 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
14126
14127 #. type: Plain text
14128 #: build/C/man3/unlocked_stdio.3:89
14129 msgid "_BSD_SOURCE || _SVID_SOURCE"
14130 msgstr "_BSD_SOURCE || _SVID_SOURCE"
14131
14132 #. type: Plain text
14133 #: build/C/man3/unlocked_stdio.3:100
14134 msgid ""
14135 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14136 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14137 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14138 msgstr ""
14139 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
14140 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
14141 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
14142
14143 #. type: Plain text
14144 #: build/C/man3/unlocked_stdio.3:111
14145 msgid ""
14146 "Each of these functions has the same behavior as its counterpart without the "
14147 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
14148 "locks themselves, and do not test for the presence of locks set by others) "
14149 "and hence are thread-unsafe.  See B<flockfile>(3)."
14150 msgstr ""
14151 "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 "
14152 "ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック "
14153 "をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行"
14154 "わない) それゆえ、スレッド(thread)で安全に使用することができない。 "
14155 "B<flockfile>(3)  を参照のこと。"
14156
14157 #. type: Plain text
14158 #: build/C/man3/unlocked_stdio.3:118
14159 msgid ""
14160 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
14161 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
14162 msgstr ""
14163 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
14164 "B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
14165
14166 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
14167 #.  moved to a compatibility library.
14168 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
14169 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
14170 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
14171 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
14172 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14173 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
14174 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
14175 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
14176 #.  ungetc_unlocked, ungetwc_unlocked.
14177 #. type: Plain text
14178 #: build/C/man3/unlocked_stdio.3:134
14179 msgid ""
14180 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
14181 "are available in recent glibc.  They should probably not be used."
14182 msgstr ""
14183 "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最"
14184 "近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
14185
14186 #. type: Plain text
14187 #: build/C/man3/unlocked_stdio.3:137
14188 msgid "B<flockfile>(3), B<stdio>(3)"
14189 msgstr "B<flockfile>(3), B<stdio>(3)"
14190
14191 #. type: TH
14192 #: build/C/man3/wprintf.3:14
14193 #, no-wrap
14194 msgid "WPRINTF"
14195 msgstr "WPRINTF"
14196
14197 #. type: TH
14198 #: build/C/man3/wprintf.3:14
14199 #, no-wrap
14200 msgid "2011-09-17"
14201 msgstr "2011-09-17"
14202
14203 #. type: Plain text
14204 #: build/C/man3/wprintf.3:18
14205 msgid ""
14206 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-"
14207 "character output conversion"
14208 msgstr ""
14209 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を "
14210 "フォーマットして出力する"
14211
14212 #. type: Plain text
14213 #: build/C/man3/wprintf.3:22
14214 #, no-wrap
14215 msgid ""
14216 "B<#include E<lt>stdio.hE<gt>>\n"
14217 "B<#include E<lt>wchar.hE<gt>>\n"
14218 msgstr ""
14219 "B<#include E<lt>stdio.hE<gt>>\n"
14220 "B<#include E<lt>wchar.hE<gt>>\n"
14221
14222 #. type: Plain text
14223 #: build/C/man3/wprintf.3:27
14224 #, no-wrap
14225 msgid ""
14226 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14227 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14228 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14229 "B<             const wchar_t *>I<format>B<, ...);>\n"
14230 msgstr ""
14231 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
14232 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
14233 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14234 "B<             const wchar_t *>I<format>B<, ...);>\n"
14235
14236 #. type: Plain text
14237 #: build/C/man3/wprintf.3:32
14238 #, no-wrap
14239 msgid ""
14240 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14241 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14242 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14243 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14244 msgstr ""
14245 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14246 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14247 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
14248 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
14249
14250 #.  .BR wprintf (),
14251 #.  .BR fwprintf (),
14252 #.  .BR swprintf (),
14253 #.  .BR vwprintf (),
14254 #.  .BR vfwprintf (),
14255 #.  .BR vswprintf ():
14256 #. type: Plain text
14257 #: build/C/man3/wprintf.3:49
14258 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14259 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
14260
14261 #. type: Plain text
14262 #: build/C/man3/wprintf.3:51
14263 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14264 msgstr "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
14265
14266 #. type: Plain text
14267 #: build/C/man3/wprintf.3:53
14268 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14269 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
14270
14271 #. type: Plain text
14272 #: build/C/man3/wprintf.3:56
14273 msgid "or I<cc\\ -std=c99>"
14274 msgstr "or I<cc\\ -std=c99>"
14275
14276 #. type: Plain text
14277 #: build/C/man3/wprintf.3:67
14278 msgid ""
14279 "The B<wprintf>()  family of functions is the wide-character equivalent of "
14280 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
14281 "characters."
14282 msgstr ""
14283 "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字"
14284 "版である。これらはワイド文字をフォーマットして出力する。"
14285
14286 #. type: Plain text
14287 #: build/C/man3/wprintf.3:77
14288 msgid ""
14289 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
14290 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
14291 "more information."
14292 msgstr ""
14293 "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> "
14294 "がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照す"
14295 "ること。"
14296
14297 #. type: Plain text
14298 #: build/C/man3/wprintf.3:87
14299 msgid ""
14300 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
14301 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
14302 "for more information."
14303 msgstr ""
14304 "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行な"
14305 "う。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は "
14306 "B<fwide>(3)  を参照すること。"
14307
14308 #. type: Plain text
14309 #: build/C/man3/wprintf.3:98
14310 msgid ""
14311 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
14312 "output to an array of wide characters.  The programmer must ensure that "
14313 "there is room for at least I<maxlen> wide characters at I<wcs>."
14314 msgstr ""
14315 "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行"
14316 "なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる"
14317 "空きがあることを保証しなければ ならない。"
14318
14319 #. type: Plain text
14320 #: build/C/man3/wprintf.3:109
14321 msgid ""
14322 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
14323 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
14324 "following differences:"
14325 msgstr ""
14326 "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), "
14327 "B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
14328
14329 #. type: TP
14330 #: build/C/man3/wprintf.3:109 build/C/man3/wprintf.3:112
14331 #: build/C/man3/wprintf.3:115
14332 #, no-wrap
14333 msgid "B<\\(bu>"
14334 msgstr "B<\\(bu>"
14335
14336 #. type: Plain text
14337 #: build/C/man3/wprintf.3:112
14338 msgid "The I<format> string is a wide-character string."
14339 msgstr "I<format> がワイド文字列で与えられる。"
14340
14341 #. type: Plain text
14342 #: build/C/man3/wprintf.3:115
14343 msgid "The output consists of wide characters, not bytes."
14344 msgstr "出力がバイトではなくワイド文字で構成される。"
14345
14346 #. type: Plain text
14347 #: build/C/man3/wprintf.3:130
14348 msgid ""
14349 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
14350 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
14351 "I<maxlen> argument, but these functions do not return -1 upon buffer "
14352 "overflow on Linux.)"
14353 msgstr ""
14354 "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>"
14355 "()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は "
14356 "I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合で"
14357 "も -1 を返さない)。"
14358
14359 #. type: Plain text
14360 #: build/C/man3/wprintf.3:132
14361 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
14362 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
14363
14364 #. type: Plain text
14365 #: build/C/man3/wprintf.3:146
14366 msgid ""
14367 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
14368 "character by a call to the B<btowc>(3)  function, and the resulting wide "
14369 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
14370 "character) argument is written."
14371 msgstr ""
14372 "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によって"
14373 "ワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存"
14374 "在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
14375
14376 #. type: Plain text
14377 #: build/C/man3/wprintf.3:185
14378 msgid ""
14379 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
14380 "to be a pointer to an array of character type (pointer to a string) "
14381 "containing a multibyte character sequence beginning in the initial shift "
14382 "state.  Characters from the array are converted to wide characters (each by "
14383 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
14384 "the initial state before the first byte).  The resulting wide characters are "
14385 "written up to (but not including) the terminating null wide character.  If a "
14386 "precision is specified, no more wide characters than the number specified "
14387 "are written.  Note that the precision determines the number of I<wide "
14388 "characters> written, not the number of I<bytes> or I<screen positions>.  The "
14389 "array must contain a terminating null byte, unless a precision is given and "
14390 "it is so small that the number of converted wide characters reaches it "
14391 "before the end of the array is reached.  If an B<l> modifier is present: The "
14392 "I<const\\ wchar_t\\ *> argument is expected to be a pointer to an array of "
14393 "wide characters.  Wide characters from the array are written up to (but not "
14394 "including) a terminating null wide character.  If a precision is specified, "
14395 "no more than the number specified are written.  The array must contain a "
14396 "terminating null wide character, unless a precision is given and it is "
14397 "smaller than or equal to the number of wide characters in the array."
14398 msgstr ""
14399 "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始"
14400 "まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)"
14401 "とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれ"
14402 "の文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文"
14403 "字は終端の ナルワイド文字の手前までが書き込まれる。精度(precision)が指定され"
14404 "た 場合、指定された数字を超えるワイド文字は書き込まれない。精度は 書き込まれ"
14405 "る I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字> の数を指定することに"
14406 "注意すること。 精度がない場合には配列の終端にナル文字を含む必要がある。 精度"
14407 "を指定する場合には、配列の最後に到着する前に変換されたワイド文字の 数がそれに"
14408 "到達するよう、精度は十分に小さな数でなければならない。 もし B<l> 修飾子が存在"
14409 "する場合、 I<const\\ wchar_t\\ *> 引き数はワイド文字の配列へのポインタとみな"
14410 "される。 配列のワイド文字列は終端のナルワイド文字の手間まで出力される。 もし"
14411 "精度が指定された場合には指定された精度以上の文字は出力されない。 精度を指定し"
14412 "ない場合には終端のナルワイド文字を含む必要がある。 精度を指定する場合にはそれ"
14413 "はワイド文字の配列の大きさよりも小さくな ければならない。"
14414
14415 #. type: Plain text
14416 #: build/C/man3/wprintf.3:193
14417 msgid ""
14418 "The functions return the number of wide characters written, excluding the "
14419 "terminating null wide character in case of the functions B<swprintf>()  and "
14420 "B<vswprintf>().  They return -1 when an error occurs."
14421 msgstr ""
14422 "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と "
14423 "B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった"
14424 "場合は -1 を返す。"
14425
14426 #. type: Plain text
14427 #: build/C/man3/wprintf.3:195
14428 msgid "C99."
14429 msgstr "C99."
14430
14431 #. type: Plain text
14432 #: build/C/man3/wprintf.3:203
14433 msgid ""
14434 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
14435 "the current locale."
14436 msgstr ""
14437 "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
14438
14439 #. type: Plain text
14440 #: build/C/man3/wprintf.3:229
14441 msgid ""
14442 "If the I<format> string contains non-ASCII wide characters, the program will "
14443 "only work correctly if the B<LC_CTYPE> category of the current locale at run "
14444 "time is the same as the B<LC_CTYPE> category of the current locale at "
14445 "compile time.  This is because the I<wchar_t> representation is platform- "
14446 "and locale-dependent.  (The glibc represents wide characters using their "
14447 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
14448 "the use of C99 universal character names of the form \\eunnnn does not solve "
14449 "this problem.)  Therefore, in internationalized programs, the I<format> "
14450 "string should consist of ASCII wide characters only, or should be "
14451 "constructed at run time in an internationalized way (e.g., using B<gettext>"
14452 "(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
14453 msgstr ""
14454 "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケール"
14455 "の B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場"
14456 "合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプ"
14457 "ラットホームに依存していることに原因がある。 (glibc ではワイド文字として "
14458 "Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそ"
14459 "うではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しな"
14460 "い。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文"
14461 "字のみにするか、実行時に国際化された方法で構成する必要がある (例えば "
14462 "B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
14463
14464 #.  .BR wscanf (3)
14465 #. type: Plain text
14466 #: build/C/man3/wprintf.3:236
14467 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14468 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
14469
14470 #. type: TH
14471 #: build/C/man2/write.2:39
14472 #, no-wrap
14473 msgid "WRITE"
14474 msgstr "WRITE"
14475
14476 #. type: TH
14477 #: build/C/man2/write.2:39
14478 #, no-wrap
14479 msgid "2010-08-29"
14480 msgstr "2010-08-29"
14481
14482 #. type: Plain text
14483 #: build/C/man2/write.2:42
14484 msgid "write - write to a file descriptor"
14485 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
14486
14487 #. type: Plain text
14488 #: build/C/man2/write.2:46
14489 msgid ""
14490 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14491 msgstr ""
14492 "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
14493
14494 #. type: Plain text
14495 #: build/C/man2/write.2:54
14496 msgid ""
14497 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
14498 "the file referred to by the file descriptor I<fd>."
14499 msgstr ""
14500 "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参"
14501 "照するファイルへ、最大 I<count> バイトを書き込む。"
14502
14503 #. type: Plain text
14504 #: build/C/man2/write.2:68
14505 msgid ""
14506 "The number of bytes written may be less than I<count> if, for example, there "
14507 "is insufficient space on the underlying physical medium, or the "
14508 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
14509 "call was interrupted by a signal handler after having written less than "
14510 "I<count> bytes.  (See also B<pipe>(7).)"
14511 msgstr ""
14512 "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み"
14513 "対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達"
14514 "した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後"
14515 "で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>"
14516 "(7)  も参照のこと。)"
14517
14518 #. type: Plain text
14519 #: build/C/man2/write.2:82
14520 msgid ""
14521 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
14522 "example, a regular file)  writing takes place at the current file offset, "
14523 "and the file offset is incremented by the number of bytes actually written.  "
14524 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
14525 "to the end of the file before writing.  The adjustment of the file offset "
14526 "and the write operation are performed as an atomic step."
14527 msgstr ""
14528 "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常の"
14529 "ファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフ"
14530 "セットは実際に書き込みが行われたバイト数分 加算される。ファイルが "
14531 "B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファ"
14532 "イルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな"
14533 "処理として 実行される。"
14534
14535 #. type: Plain text
14536 #: build/C/man2/write.2:89
14537 msgid ""
14538 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
14539 "B<write>()  has returned returns the new data.  Note that not all file "
14540 "systems are POSIX conforming."
14541 msgstr ""
14542 "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返"
14543 "すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意す"
14544 "ること。"
14545
14546 #. type: Plain text
14547 #: build/C/man2/write.2:94
14548 msgid ""
14549 "On success, the number of bytes written is returned (zero indicates nothing "
14550 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
14551 msgstr ""
14552 "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったこ"
14553 "とを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
14554
14555 #. type: Plain text
14556 #: build/C/man2/write.2:107
14557 msgid ""
14558 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
14559 "return a failure status if one of the errors below is detected.  If no "
14560 "errors are detected, 0 will be returned without causing any other effect.  "
14561 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
14562 "the results are not specified."
14563 msgstr ""
14564 "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場"
14565 "合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがあ"
14566 "る。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 "
14567 "I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 "
14568 "その結果は規定されていない。"
14569
14570 #. type: Plain text
14571 #: build/C/man2/write.2:115
14572 msgid ""
14573 "The file descriptor I<fd> refers to a file other than a socket and has been "
14574 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
14575 msgstr ""
14576 "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 "
14577 "(nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止"
14578 "する状況にある。"
14579
14580 #.  Actually EAGAIN on Linux
14581 #. type: Plain text
14582 #: build/C/man2/write.2:126
14583 msgid ""
14584 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
14585 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
14586 "error to be returned for this case, and does not require these constants to "
14587 "have the same value, so a portable application should check for both "
14588 "possibilities."
14589 msgstr ""
14590 "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) "
14591 "モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にあ"
14592 "る。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これ"
14593 "ら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なア"
14594 "プリケーションでは、両方の可能性を 確認すべきである。"
14595
14596 #. type: Plain text
14597 #: build/C/man2/write.2:130
14598 msgid "I<fd> is not a valid file descriptor or is not open for writing."
14599 msgstr ""
14600 "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) "
14601 "されていない。"
14602
14603 #. type: TP
14604 #: build/C/man2/write.2:130
14605 #, no-wrap
14606 msgid "B<EDESTADDRREQ>"
14607 msgstr "B<EDESTADDRREQ>"
14608
14609 #. type: Plain text
14610 #: build/C/man2/write.2:135
14611 msgid ""
14612 "I<fd> refers to a datagram socket for which a peer address has not been set "
14613 "using B<connect>(2)."
14614 msgstr ""
14615 "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータ"
14616 "グラムソケットを 参照している。"
14617
14618 #. type: Plain text
14619 #: build/C/man2/write.2:144
14620 msgid ""
14621 "An attempt was made to write a file that exceeds the implementation-defined "
14622 "maximum file size or the process's file size limit, or to write at a "
14623 "position past the maximum allowed offset."
14624 msgstr ""
14625 "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイ"
14626 "ルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に "
14627 "書き込もうとした。"
14628
14629 #. type: Plain text
14630 #: build/C/man2/write.2:148
14631 msgid ""
14632 "The call was interrupted by a signal before any data was written; see "
14633 "B<signal>(7)."
14634 msgstr ""
14635 "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>"
14636 "(7)  参照。"
14637
14638 #. type: Plain text
14639 #: build/C/man2/write.2:159
14640 msgid ""
14641 "I<fd> is attached to an object which is unsuitable for writing; or the file "
14642 "was opened with the B<O_DIRECT> flag, and either the address specified in "
14643 "I<buf>, the value specified in I<count>, or the current file offset is not "
14644 "suitably aligned."
14645 msgstr ""
14646 "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが "
14647 "B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレ"
14648 "ス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アライン"
14649 "メントが不適切である。"
14650
14651 #. type: Plain text
14652 #: build/C/man2/write.2:162
14653 msgid "A low-level I/O error occurred while modifying the inode."
14654 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
14655
14656 #. type: Plain text
14657 #: build/C/man2/write.2:167
14658 msgid ""
14659 "The device containing the file referred to by I<fd> has no room for the data."
14660 msgstr ""
14661 "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
14662
14663 #. type: TP
14664 #: build/C/man2/write.2:167
14665 #, no-wrap
14666 msgid "B<EPIPE>"
14667 msgstr "B<EPIPE>"
14668
14669 #. type: Plain text
14670 #: build/C/man2/write.2:176
14671 msgid ""
14672 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
14673 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
14674 "(Thus, the write return value is seen only if the program catches, blocks or "
14675 "ignores this signal.)"
14676 msgstr ""
14677 "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み"
14678 "込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行"
14679 "なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラム"
14680 "がこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、"
14681 "write の返り値を参照できる。)"
14682
14683 #. type: Plain text
14684 #: build/C/man2/write.2:179
14685 msgid "Other errors may occur, depending on the object connected to I<fd>."
14686 msgstr ""
14687 "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
14688
14689 #. type: Plain text
14690 #: build/C/man2/write.2:188
14691 msgid ""
14692 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
14693 "just before any data is written."
14694 msgstr ""
14695 "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点"
14696 "で B<EINTR> が返る。"
14697
14698 #. type: Plain text
14699 #: build/C/man2/write.2:197
14700 msgid ""
14701 "A successful return from B<write>()  does not make any guarantee that data "
14702 "has been committed to disk.  In fact, on some buggy implementations, it does "
14703 "not even guarantee that space has successfully been reserved for the data.  "
14704 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
14705 "all your data."
14706 msgstr ""
14707 "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証す"
14708 "るものではない。 実際、データのためのスペースが確保されたことすら保証されない"
14709 "という バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを "
14710 "write した後に B<fsync>(2)  を呼び出すことである。"
14711
14712 #. type: Plain text
14713 #: build/C/man2/write.2:205
14714 msgid ""
14715 "If a B<write>()  is interrupted by a signal handler before any bytes are "
14716 "written, then the call fails with the error B<EINTR>; if it is interrupted "
14717 "after at least one byte has been written, the call succeeds, and returns the "
14718 "number of bytes written."
14719 msgstr ""
14720 "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた"
14721 "場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割"
14722 "り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
14723
14724 #. type: Plain text
14725 #: build/C/man2/write.2:217
14726 msgid ""
14727 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
14728 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
14729 msgstr ""
14730 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
14731 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
14732
14733 #. type: TH
14734 #: build/C/man2/process_vm_readv.2:27
14735 #, no-wrap
14736 msgid "PROCESS_VM_READV"
14737 msgstr ""
14738
14739 #. type: TH
14740 #: build/C/man2/process_vm_readv.2:27
14741 #, no-wrap
14742 msgid "2012-04-25"
14743 msgstr "2012-04-25"
14744
14745 #. type: Plain text
14746 #: build/C/man2/process_vm_readv.2:30
14747 msgid ""
14748 "process_vm_readv, process_vm_writev - transfer data between process address "
14749 "spaces"
14750 msgstr ""
14751
14752 #. type: Plain text
14753 #: build/C/man2/process_vm_readv.2:40
14754 #, no-wrap
14755 msgid ""
14756 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
14757 "B<                         const struct iovec *>I<local_iov>B<,>\n"
14758 "B<                         unsigned long >I<liovcnt>B<,>\n"
14759 "B<                         const struct iovec *>I<remote_iov>B<,>\n"
14760 "B<                         unsigned long >I<riovcnt>B<,>\n"
14761 "B<                         unsigned long >I<flags>B<);>\n"
14762 msgstr ""
14763
14764 #. type: Plain text
14765 #: build/C/man2/process_vm_readv.2:47
14766 #, no-wrap
14767 msgid ""
14768 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
14769 "B<                          const struct iovec *>I<local_iov>B<,>\n"
14770 "B<                          unsigned long >I<liovcnt>B<,>\n"
14771 "B<                          const struct iovec *>I<remote_iov>B<,>\n"
14772 "B<                          unsigned long >I<riovcnt>B<,>\n"
14773 "B<                          unsigned long >I<flags>B<);>\n"
14774 msgstr ""
14775
14776 #. type: Plain text
14777 #: build/C/man2/process_vm_readv.2:55
14778 msgid ""
14779 "These system calls transfer data between the address space of the calling "
14780 "process (\"the local process\") and the process identified by I<pid> (\"the "
14781 "remote process\").  The data moves directly between the address spaces of "
14782 "the two processes, without passing through kernel space."
14783 msgstr ""
14784
14785 #. type: Plain text
14786 #: build/C/man2/process_vm_readv.2:80
14787 msgid ""
14788 "The B<process_vm_readv>()  system call transfers data from the remote "
14789 "process to the local process.  The data to be transferred is identified by "
14790 "I<remote_iov> and I<riovcnt>: I<remote_iov> is a pointer to an array "
14791 "describing address ranges in the process I<pid>, and I<riovcnt> specifies "
14792 "the number of elements in I<remote_iov>.  The data is transferred to the "
14793 "locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a "
14794 "pointer to an array describing address ranges in the calling process, and "
14795 "I<liovcnt> specifies the number of elements in I<local_iov>."
14796 msgstr ""
14797
14798 #. type: Plain text
14799 #: build/C/man2/process_vm_readv.2:94
14800 msgid ""
14801 "The B<process_vm_writev>()  system call is the converse of "
14802 "B<process_vm_readv>()\\(emit transfers data from the local process to the "
14803 "remote process.  Other than the direction of the transfer, the arguments "
14804 "I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same "
14805 "meaning as for B<process_vm_readv>()."
14806 msgstr ""
14807
14808 #. type: Plain text
14809 #: build/C/man2/process_vm_readv.2:104
14810 msgid ""
14811 "The I<local_iov> and I<remote_iov> arguments point to an array of I<iovec> "
14812 "structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
14813 msgstr ""
14814 "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
14815 "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
14816 "されている:"
14817
14818 #. type: Plain text
14819 #: build/C/man2/process_vm_readv.2:127
14820 msgid ""
14821 "Buffers are processed in array order.  This means that B<process_vm_readv>"
14822 "()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]>, "
14823 "and so on.  Likewise, I<remote_iov[0]> is completely read before proceeding "
14824 "to I<remote_iov[1]>, and so on."
14825 msgstr ""
14826 "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
14827 "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
14828 "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
14829 "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
14830 "以降も同様である。"
14831
14832 #. type: Plain text
14833 #: build/C/man2/process_vm_readv.2:138
14834 msgid ""
14835 "Similarly, B<process_vm_writev>()  writes out the entire contents of "
14836 "I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely "
14837 "fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
14838 msgstr ""
14839
14840 #. type: Plain text
14841 #: build/C/man2/process_vm_readv.2:146
14842 msgid ""
14843 "The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not "
14844 "have to be the same.  Thus, it is possible to split a single local buffer "
14845 "into multiple remote buffers, or vice versa."
14846 msgstr ""
14847
14848 #. type: Plain text
14849 #: build/C/man2/process_vm_readv.2:150
14850 msgid "The I<flags> argument is currently unused and must be set to 0."
14851 msgstr "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
14852
14853 #.  In time, glibc might provide a wrapper that works around this limit,
14854 #.  as is done for readv()/writev()
14855 #. type: Plain text
14856 #: build/C/man2/process_vm_readv.2:163
14857 msgid ""
14858 "The values specified in the I<liovcnt> and I<riovcnt> arguments must be less "
14859 "than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible "
14860 "via the call I<sysconf(_SC_IOV_MAX)>)."
14861 msgstr ""
14862
14863 #. type: Plain text
14864 #: build/C/man2/process_vm_readv.2:173
14865 msgid ""
14866 "The count arguments and I<local_iov> are checked before doing any "
14867 "transfers.  If the counts are too big, or I<local_iov> is invalid, or the "
14868 "addresses refer to regions that are inaccessible to the local process, none "
14869 "of the vectors will be processed and an error will be returned immediately."
14870 msgstr ""
14871
14872 #. type: Plain text
14873 #: build/C/man2/process_vm_readv.2:193
14874 msgid ""
14875 "Note, however, that these system calls do not check the memory regions in "
14876 "the remote process until just before doing the read/write.  Consequently, a "
14877 "partial read/write (see RETURN VALUE)  may result if one of the "
14878 "I<remote_iov> elements points to an invalid memory region in the remote "
14879 "process.  No further reads/writes will be attempted beyond that point.  Keep "
14880 "this in mind when attempting to read data of unknown length (such as C "
14881 "strings that are null-terminated) from a remote process, by avoiding "
14882 "spanning memory pages (typically 4KiB) in a single remote I<iovec> element.  "
14883 "(Instead, split the remote read into two I<remote_iov> elements and have "
14884 "them merge back into a single write I<local_iov> entry.  The first read "
14885 "entry goes up to the page boundary, while the second starts on the next page "
14886 "boundary.)"
14887 msgstr ""
14888
14889 #. type: Plain text
14890 #: build/C/man2/process_vm_readv.2:207
14891 msgid ""
14892 "In order to read from or write to another process, either the caller must "
14893 "have the capability B<CAP_SYS_PTRACE>, or the real user ID, effective user "
14894 "ID, and saved set-user-ID of the remote process must match the real user ID "
14895 "of the caller I<and> the real group ID, effective group ID, and saved set-"
14896 "group-ID of the remote process must match the real group ID of the caller.  "
14897 "(The permission required is exactly the same as that required to perform a "
14898 "B<ptrace>(2)  B<PTRACE_ATTACH> on the remote process.)"
14899 msgstr ""
14900
14901 #. type: Plain text
14902 #: build/C/man2/process_vm_readv.2:223
14903 msgid ""
14904 "On success, B<process_vm_readv>()  returns the number of bytes read and "
14905 "B<process_vm_writev>()  returns the number of bytes written.  This return "
14906 "value may be less than the total number of requested bytes, if a partial "
14907 "read/write occurred.  (Partial transfers apply at the granularity of "
14908 "I<iovec> elements.  These system calls won't perform a partial transfer that "
14909 "splits a single I<iovec> element.)  The caller should check the return value "
14910 "to determine whether a partial read/write occurred."
14911 msgstr ""
14912
14913 #. type: Plain text
14914 #: build/C/man2/process_vm_readv.2:227
14915 msgid "On error, -1 is returned and I<errno> is set appropriately."
14916 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
14917
14918 #. type: Plain text
14919 #: build/C/man2/process_vm_readv.2:239
14920 msgid ""
14921 "The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> "
14922 "overflows a I<ssize_t> value."
14923 msgstr ""
14924
14925 #. type: Plain text
14926 #: build/C/man2/process_vm_readv.2:243
14927 msgid "I<flags> is not 0."
14928 msgstr "I<flags> が 0 でない。"
14929
14930 #. type: Plain text
14931 #: build/C/man2/process_vm_readv.2:249
14932 msgid "I<liovcnt> or I<riovcnt> is too large."
14933 msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
14934
14935 #. type: Plain text
14936 #: build/C/man2/process_vm_readv.2:254
14937 msgid ""
14938 "The memory described by I<local_iov> is outside the caller's accessible "
14939 "address space."
14940 msgstr ""
14941 "I<local_iov> が示すメモリが呼び出し側がアクセス可能な\n"
14942 "アドレス空間の外にある。"
14943
14944 #. type: Plain text
14945 #: build/C/man2/process_vm_readv.2:260
14946 msgid ""
14947 "The memory described by I<remote_iov> is outside the accessible address "
14948 "space of the process I<pid>."
14949 msgstr ""
14950
14951 #. type: Plain text
14952 #: build/C/man2/process_vm_readv.2:265
14953 msgid ""
14954 "Could not allocate memory for internal copies of the I<iovec> structures."
14955 msgstr ""
14956
14957 #. type: Plain text
14958 #: build/C/man2/process_vm_readv.2:269
14959 msgid ""
14960 "The caller does not have permission to access the address space of the "
14961 "process I<pid>."
14962 msgstr ""
14963 "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
14964 "持っていない。"
14965
14966 #. type: TP
14967 #: build/C/man2/process_vm_readv.2:269
14968 #, no-wrap
14969 msgid "B<ESRCH>"
14970 msgstr "B<ESRCH>"
14971
14972 #. type: Plain text
14973 #: build/C/man2/process_vm_readv.2:274
14974 msgid "No process with ID I<pid> exists."
14975 msgstr "ID が I<pid> のプロセスが存在しない。"
14976
14977 #. type: Plain text
14978 #: build/C/man2/process_vm_readv.2:277
14979 msgid ""
14980 "These system calls were added in Linux 3.2.  Support is provided in glibc "
14981 "since version 2.15."
14982 msgstr ""
14983 "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
14984 "サポートは glibc バージョン 2.15 以降で提供されている。"
14985
14986 #. type: Plain text
14987 #: build/C/man2/process_vm_readv.2:279
14988 msgid "These system calls are nonstandard Linux extensions."
14989 msgstr "これらのシステムコールは非標準で Linux による拡張である。"
14990
14991 #. type: Plain text
14992 #: build/C/man2/process_vm_readv.2:285
14993 msgid ""
14994 "The data transfers performed by B<process_vm_readv>()  and "
14995 "B<process_vm_writev>()  are not guaranteed to be atomic in any way."
14996 msgstr ""
14997
14998 #.  Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
14999 #.  See also some benchmarks at http://lwn.net/Articles/405284/
15000 #.  and http://marc.info/?l=linux-mm&m=130105930902915&w=2
15001 #. type: Plain text
15002 #: build/C/man2/process_vm_readv.2:293
15003 msgid ""
15004 "These system calls were designed to permit fast message passing by allowing "
15005 "messages to be exchanged with a single copy operation (rather than the "
15006 "double copy that would be required when using, for example, shared memory or "
15007 "pipes)."
15008 msgstr ""
15009
15010 #. type: Plain text
15011 #: build/C/man2/process_vm_readv.2:301
15012 msgid ""
15013 "The following code sample demonstrates the use of B<process_vm_readv>().  It "
15014 "reads 20 bytes at the address 0x10000 from the process with PID 10 and "
15015 "writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
15016 msgstr ""
15017
15018 #. type: Plain text
15019 #: build/C/man2/process_vm_readv.2:304
15020 #, no-wrap
15021 msgid "#include E<lt>sys/uio.hE<gt>\n"
15022 msgstr "#include E<lt>sys/uio.hE<gt>\n"
15023
15024 #. type: Plain text
15025 #: build/C/man2/process_vm_readv.2:314
15026 #, no-wrap
15027 msgid ""
15028 "int\n"
15029 "main(void)\n"
15030 "{\n"
15031 "    struct iovec local[2];\n"
15032 "    struct iovec remote[1];\n"
15033 "    char buf1[10];\n"
15034 "    char buf2[10];\n"
15035 "    ssize_t nread;\n"
15036 "    pid_t pid = 10;             /* PID of remote process */\n"
15037 msgstr ""
15038 "int\n"
15039 "main(void)\n"
15040 "{\n"
15041 "    struct iovec local[2];\n"
15042 "    struct iovec remote[1];\n"
15043 "    char buf1[10];\n"
15044 "    char buf2[10];\n"
15045 "    ssize_t nread;\n"
15046 "    pid_t pid = 10;             /* PID of remote process */\n"
15047
15048 #. type: Plain text
15049 #: build/C/man2/process_vm_readv.2:321
15050 #, no-wrap
15051 msgid ""
15052 "    local[0].iov_base = buf1;\n"
15053 "    local[0].iov_len = 10;\n"
15054 "    local[1].iov_base = buf2;\n"
15055 "    local[1].iov_len = 10;\n"
15056 "    remote[0].iov_base = (void *) 0x10000;\n"
15057 "    remote[1].iov_len = 20;\n"
15058 msgstr ""
15059 "    local[0].iov_base = buf1;\n"
15060 "    local[0].iov_len = 10;\n"
15061 "    local[1].iov_base = buf2;\n"
15062 "    local[1].iov_len = 10;\n"
15063 "    remote[0].iov_base = (void *) 0x10000;\n"
15064 "    remote[1].iov_len = 20;\n"
15065
15066 #. type: Plain text
15067 #: build/C/man2/process_vm_readv.2:328
15068 #, no-wrap
15069 msgid ""
15070 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
15071 "    if (nread != 20)\n"
15072 "        return 1;\n"
15073 "    else\n"
15074 "        return 0;\n"
15075 "}\n"
15076 msgstr ""
15077 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
15078 "    if (nread != 20)\n"
15079 "        return 1;\n"
15080 "    else\n"
15081 "        return 0;\n"
15082 "}\n"
15083
15084 #. type: Plain text
15085 #: build/C/man2/process_vm_readv.2:332
15086 msgid "B<readv>(2), B<writev>(2)"
15087 msgstr "B<readv>(2), B<writev>(2)"
15088
15089 #~ msgid "call."
15090 #~ msgstr "の呼び出しを実行したかのように) ファイル末尾に対して行われる。"
15091
15092 #~ msgid ""
15093 #~ "C89, C99, POSIX.1-2001.  LSB deprecates B<gets>().  POSIX.1-2008 marks "
15094 #~ "B<gets>()  obsolescent."
15095 #~ msgstr ""
15096 #~ "C89, C99, POSIX.1-2001.  LSB では B<gets>()  は非推奨である。 "
15097 #~ "POSIX.1-2008 では B<gets>()  は廃止予定であるとされている。"
15098
15099 #~ msgid ""
15100 #~ "This document's use of I<whence> is incorrect English, but maintained for "
15101 #~ "historical reasons."
15102 #~ msgstr ""
15103 #~ "この文章で使用した I<whence> は英語として正しくないが、 歴史的理由によりそ"
15104 #~ "のまま使われている。"
15105
15106 #~ msgid "B<EBUSY> (not on Linux)"
15107 #~ msgstr "B<EBUSY> (Linux 以外)"