OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.52.
[linuxjm/LDP_man-pages.git] / po4a / stdio / po / stdio.pot
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 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2013-07-15 16:09+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man3/asprintf.3:27
21 #, no-wrap
22 msgid "ASPRINTF"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man3/asprintf.3:27 build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44 build/C/man3/fmtmsg.3:13 build/C/man3/stdio_ext.3:25 build/C/man3/tmpnam.3:27
27 #, no-wrap
28 msgid "2013-06-21"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26 build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44 build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45 build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10 build/C/man3/fopen.3:44 build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42 build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25 build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26 build/C/man3/remove.3:31 build/C/man3/scanf.3:52 build/C/man3/wprintf.3:16
33 #, no-wrap
34 msgid "GNU"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26 build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44 build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44 build/C/man3/fflush.3:45 build/C/man3/fgetwc.3:18 build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10 build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44 build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25 build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42 build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:27 build/C/man3/getw.3:25 build/C/man2/link.2:31 build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:52 build/C/man3/perror.3:31 build/C/man2/pipe.2:36 build/C/man3/popen.3:40 build/C/man3/printf.3:34 build/C/man3/puts.3:26 build/C/man2/read.2:35 build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man3/remove.3:31 build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man3/stdio.3:39 build/C/man3/stdio_ext.3:25 build/C/man2/symlink.2:32 build/C/man7/symlink.7:36 build/C/man3/tempnam.3:25 build/C/man3/tmpfile.3:31 build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:32 build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16 build/C/man2/write.2:39
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27 build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45 build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45 build/C/man3/fflush.3:46 build/C/man3/fgetwc.3:19 build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11 build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45 build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26 build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43 build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:28 build/C/man3/getw.3:26 build/C/man2/link.2:32 build/C/man2/llseek.2:29 build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:53 build/C/man3/perror.3:32 build/C/man2/pipe.2:37 build/C/man3/popen.3:41 build/C/man3/printf.3:35 build/C/man3/puts.3:27 build/C/man2/read.2:36 build/C/man2/readlink.2:44 build/C/man2/readv.2:33 build/C/man3/remove.3:32 build/C/man2/rename.2:33 build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53 build/C/man3/setbuf.3:49 build/C/man3/stdin.3:14 build/C/man3/stdio.3:40 build/C/man3/stdio_ext.3:26 build/C/man2/symlink.2:33 build/C/man7/symlink.7:37 build/C/man3/tempnam.3:26 build/C/man3/tmpfile.3:32 build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:33 build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17 build/C/man2/write.2:40
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man3/asprintf.3:30
51 msgid "asprintf, vasprintf - print to allocated string"
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29 build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47 build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47 build/C/man3/fflush.3:48 build/C/man3/fgetwc.3:21 build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13 build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47 build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28 build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45 build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:30 build/C/man3/getw.3:28 build/C/man2/link.2:34 build/C/man2/llseek.2:31 build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:55 build/C/man3/perror.3:34 build/C/man2/pipe.2:39 build/C/man3/popen.3:43 build/C/man3/printf.3:38 build/C/man3/puts.3:29 build/C/man2/read.2:38 build/C/man2/readlink.2:46 build/C/man2/readv.2:35 build/C/man3/remove.3:34 build/C/man2/rename.2:35 build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55 build/C/man3/setbuf.3:51 build/C/man3/stdin.3:16 build/C/man3/stdio.3:42 build/C/man3/stdio_ext.3:30 build/C/man2/symlink.2:35 build/C/man3/tempnam.3:28 build/C/man3/tmpfile.3:34 build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:35 build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20 build/C/man2/write.2:42
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man3/asprintf.3:32
62 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
63 msgstr ""
64
65 #. type: Plain text
66 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31 build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50 build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40 build/C/man3/remove.3:36 build/C/man2/rename.2:37 build/C/man3/stdio.3:44 build/C/man3/stdio_ext.3:32
67 msgid "B<#include E<lt>stdio.hE<gt>>"
68 msgstr ""
69
70 #. type: Plain text
71 #: build/C/man3/asprintf.3:36
72 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
73 msgstr ""
74
75 #. type: Plain text
76 #: build/C/man3/asprintf.3:38
77 msgid ""
78 "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list "
79 ">I<ap>B<);>"
80 msgstr ""
81
82 #. type: SH
83 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46 build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51 build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65 build/C/man3/fflush.3:52 build/C/man3/fgetwc.3:30 build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46 build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65 build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42 build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57 build/C/man3/fseeko.3:37 build/C/man3/getline.3:58 build/C/man3/gets.3:46 build/C/man3/getw.3:59 build/C/man2/link.2:38 build/C/man2/llseek.2:43 build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:66 build/C/man3/perror.3:55 build/C/man2/pipe.2:51 build/C/man3/popen.3:64 build/C/man3/printf.3:76 build/C/man3/puts.3:43 build/C/man2/read.2:44 build/C/man2/readlink.2:63 build/C/man2/readv.2:58 build/C/man3/remove.3:38 build/C/man2/rename.2:39 build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87 build/C/man3/setbuf.3:73 build/C/man3/stdin.3:24 build/C/man3/stdio.3:50 build/C/man3/stdio_ext.3:54 build/C/man2/symlink.2:52 build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40 build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:39 build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:60 build/C/man2/write.2:46
84 #, no-wrap
85 msgid "DESCRIPTION"
86 msgstr ""
87
88 #. type: Plain text
89 #: build/C/man3/asprintf.3:53
90 msgid ""
91 "The functions B<asprintf>()  and B<vasprintf>()  are analogs of "
92 "B<sprintf>(3)  and B<vsprintf>(3), except that they allocate a string large "
93 "enough to hold the output including the terminating null byte "
94 "(\\(aq\\e0\\(aq), and return a pointer to it via the first argument.  This "
95 "pointer should be passed to B<free>(3)  to release the allocated storage "
96 "when it is no longer needed."
97 msgstr ""
98
99 #. type: SH
100 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59 build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50 build/C/man3/fflush.3:74 build/C/man3/fgetwc.3:55 build/C/man3/flockfile.3:120 build/C/man3/fmemopen.3:176 build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189 build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58 build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121 build/C/man3/fseeko.3:75 build/C/man3/getline.3:110 build/C/man3/gets.3:111 build/C/man3/getw.3:73 build/C/man2/link.2:52 build/C/man2/llseek.2:62 build/C/man2/lseek.2:162 build/C/man2/open.2:477 build/C/man2/pipe.2:92 build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81 build/C/man2/readlink.2:77 build/C/man2/readv.2:177 build/C/man3/remove.3:60 build/C/man2/rename.2:91 build/C/man2/rmdir.2:40 build/C/man3/scanf.3:530 build/C/man3/setbuf.3:152 build/C/man2/symlink.2:84 build/C/man3/tempnam.3:87 build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:70 build/C/man2/unlink.2:55 build/C/man3/wprintf.3:205 build/C/man2/write.2:89
101 #, no-wrap
102 msgid "RETURN VALUE"
103 msgstr ""
104
105 #. type: Plain text
106 #: build/C/man3/asprintf.3:61
107 msgid ""
108 "When successful, these functions return the number of bytes printed, just "
109 "like B<sprintf>(3).  If memory allocation wasn't possible, or some other "
110 "error occurs, these functions will return -1, and the contents of I<strp> is "
111 "undefined."
112 msgstr ""
113
114 #. type: SH
115 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:67 build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90 build/C/man3/fcloseall.3:60 build/C/man3/ferror.3:115 build/C/man3/fflush.3:93 build/C/man3/fgetwc.3:70 build/C/man3/flockfile.3:127 build/C/man3/fmemopen.3:195 build/C/man3/fmtmsg.3:237 build/C/man3/fopen.3:246 build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70 build/C/man3/fputwc.3:68 build/C/man3/fread.3:103 build/C/man3/fseek.3:168 build/C/man3/fseeko.3:87 build/C/man3/getline.3:137 build/C/man3/gets.3:138 build/C/man3/getw.3:80 build/C/man2/link.2:138 build/C/man2/llseek.2:81 build/C/man2/lseek.2:200 build/C/man2/open.2:629 build/C/man3/perror.3:111 build/C/man2/pipe.2:118 build/C/man3/popen.3:172 build/C/man3/printf.3:806 build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:125 build/C/man2/readv.2:214 build/C/man3/remove.3:70 build/C/man2/rename.2:232 build/C/man2/rmdir.2:127 build/C/man3/scanf.3:577 build/C/man3/setbuf.3:164 build/C/man3/stdin.3:113 build/C/man3/stdio.3:246 build/C/man2/symlink.2:149 build/C/man3/tempnam.3:98 build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:87 build/C/man2/unlink.2:141 build/C/man3/unlocked_stdio.3:113 build/C/man3/wprintf.3:213 build/C/man2/write.2:185
116 #, no-wrap
117 msgid "CONFORMING TO"
118 msgstr ""
119
120 #. type: Plain text
121 #: build/C/man3/asprintf.3:67
122 msgid ""
123 "These functions are GNU extensions, not in C or POSIX.  They are also "
124 "available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on "
125 "error."
126 msgstr ""
127
128 #. type: SH
129 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:77 build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102 build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:122 build/C/man3/fflush.3:108 build/C/man3/fgetwc.3:87 build/C/man3/flockfile.3:135 build/C/man3/fmemopen.3:341 build/C/man3/fmtmsg.3:309 build/C/man3/fopen.3:348 build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80 build/C/man3/fputwc.3:85 build/C/man3/fread.3:105 build/C/man3/fseek.3:170 build/C/man3/fseeko.3:93 build/C/man3/getline.3:171 build/C/man3/gets.3:173 build/C/man3/getw.3:86 build/C/man2/link.2:187 build/C/man2/llseek.2:87 build/C/man2/lseek.2:245 build/C/man3/lseek64.3:159 build/C/man2/open.2:901 build/C/man3/perror.3:139 build/C/man2/pipe.2:190 build/C/man3/popen.3:201 build/C/man3/printf.3:1080 build/C/man3/puts.3:112 build/C/man2/read.2:187 build/C/man2/readlink.2:214 build/C/man2/readv.2:284 build/C/man3/remove.3:81 build/C/man2/rename.2:245 build/C/man2/rmdir.2:132 build/C/man3/scanf.3:715 build/C/man3/setbuf.3:200 build/C/man3/stdin.3:154 build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:151 build/C/man2/symlink.2:164 build/C/man7/symlink.7:471 build/C/man3/tempnam.3:168 build/C/man3/tmpfile.3:97 build/C/man3/tmpnam.3:163 build/C/man2/unlink.2:148 build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:253 build/C/man2/write.2:211
130 #, no-wrap
131 msgid "SEE ALSO"
132 msgstr ""
133
134 #. type: Plain text
135 #: build/C/man3/asprintf.3:71
136 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
137 msgstr ""
138
139 #. type: SH
140 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:79 build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108 build/C/man3/fcloseall.3:68 build/C/man3/ferror.3:127 build/C/man3/fflush.3:116 build/C/man3/fgetwc.3:92 build/C/man3/flockfile.3:137 build/C/man3/fmemopen.3:344 build/C/man3/fmtmsg.3:312 build/C/man3/fopen.3:354 build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85 build/C/man3/fputwc.3:89 build/C/man3/fread.3:111 build/C/man3/fseek.3:173 build/C/man3/fseeko.3:95 build/C/man3/getline.3:178 build/C/man3/gets.3:189 build/C/man3/getw.3:92 build/C/man2/link.2:197 build/C/man2/llseek.2:90 build/C/man2/lseek.2:252 build/C/man3/lseek64.3:162 build/C/man2/open.2:923 build/C/man3/perror.3:144 build/C/man2/pipe.2:197 build/C/man3/popen.3:211 build/C/man3/printf.3:1089 build/C/man3/puts.3:124 build/C/man2/read.2:200 build/C/man2/readlink.2:222 build/C/man2/readv.2:288 build/C/man3/remove.3:92 build/C/man2/rename.2:254 build/C/man2/rmdir.2:141 build/C/man3/scanf.3:722 build/C/man3/setbuf.3:208 build/C/man3/stdin.3:160 build/C/man3/stdio.3:257 build/C/man3/stdio_ext.3:154 build/C/man2/symlink.2:176 build/C/man7/symlink.7:489 build/C/man3/tempnam.3:173 build/C/man3/tmpfile.3:103 build/C/man3/tmpnam.3:168 build/C/man2/unlink.2:161 build/C/man3/unlocked_stdio.3:139 build/C/man3/wprintf.3:260 build/C/man2/write.2:223
141 #, no-wrap
142 msgid "COLOPHON"
143 msgstr ""
144
145 #. type: Plain text
146 #: build/C/man3/asprintf.3:78 build/C/man3/ctermid.3:86 build/C/man3/dprintf.3:104 build/C/man3/fclose.3:115 build/C/man3/fcloseall.3:75 build/C/man3/ferror.3:134 build/C/man3/fflush.3:123 build/C/man3/fgetwc.3:99 build/C/man3/flockfile.3:144 build/C/man3/fmemopen.3:351 build/C/man3/fmtmsg.3:319 build/C/man3/fopen.3:361 build/C/man3/fopencookie.3:449 build/C/man3/fpurge.3:92 build/C/man3/fputwc.3:96 build/C/man3/fread.3:118 build/C/man3/fseek.3:180 build/C/man3/fseeko.3:102 build/C/man3/getline.3:185 build/C/man3/gets.3:196 build/C/man3/getw.3:99 build/C/man2/link.2:204 build/C/man2/llseek.2:97 build/C/man2/lseek.2:259 build/C/man3/lseek64.3:169 build/C/man2/open.2:930 build/C/man3/perror.3:151 build/C/man2/pipe.2:204 build/C/man3/popen.3:218 build/C/man3/printf.3:1096 build/C/man3/puts.3:131 build/C/man2/read.2:207 build/C/man2/readlink.2:229 build/C/man2/readv.2:295 build/C/man3/remove.3:99 build/C/man2/rename.2:261 build/C/man2/rmdir.2:148 build/C/man3/scanf.3:729 build/C/man3/setbuf.3:215 build/C/man3/stdin.3:167 build/C/man3/stdio.3:264 build/C/man3/stdio_ext.3:161 build/C/man2/symlink.2:183 build/C/man7/symlink.7:496 build/C/man3/tempnam.3:180 build/C/man3/tmpfile.3:110 build/C/man3/tmpnam.3:175 build/C/man2/unlink.2:168 build/C/man3/unlocked_stdio.3:146 build/C/man3/wprintf.3:267 build/C/man2/write.2:230
147 msgid ""
148 "This page is part of release 3.52 of the Linux I<man-pages> project.  A "
149 "description of the project, and information about reporting bugs, can be "
150 "found at \\%http://www.kernel.org/doc/man-pages/."
151 msgstr ""
152
153 #. type: TH
154 #: build/C/man3/ctermid.3:26
155 #, no-wrap
156 msgid "CTERMID"
157 msgstr ""
158
159 #. type: TH
160 #: build/C/man3/ctermid.3:26
161 #, no-wrap
162 msgid "2013-07-04"
163 msgstr ""
164
165 #. type: Plain text
166 #: build/C/man3/ctermid.3:29
167 msgid "ctermid - get controlling terminal name"
168 msgstr ""
169
170 #. type: Plain text
171 #: build/C/man3/ctermid.3:34 build/C/man3/fgetwc.3:24 build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16 build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51 build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:33 build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32 build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54 build/C/man3/stdin.3:19 build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37 build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
172 #, no-wrap
173 msgid "B<#include E<lt>stdio.hE<gt>>\n"
174 msgstr ""
175
176 #. type: Plain text
177 #: build/C/man3/ctermid.3:36
178 #, no-wrap
179 msgid "B<char *ctermid(char *>I<s>B<);>\n"
180 msgstr ""
181
182 #. type: Plain text
183 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39 build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42 build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61 build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man3/perror.3:50 build/C/man3/popen.3:55 build/C/man3/printf.3:63 build/C/man2/readlink.2:54 build/C/man2/readv.2:53 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68 build/C/man2/symlink.2:43 build/C/man3/tempnam.3:38 build/C/man3/unlocked_stdio.3:68 build/C/man3/wprintf.3:39
184 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
185 msgstr ""
186
187 #.  From <unistd.h>: _XOPEN_SOURCE
188 #. type: Plain text
189 #: build/C/man3/ctermid.3:46
190 msgid "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
191 msgstr ""
192
193 #. type: Plain text
194 #: build/C/man3/ctermid.3:59
195 msgid ""
196 "B<ctermid>()  returns a string which is the pathname for the current "
197 "controlling terminal for this process.  If I<s> is NULL, a static buffer is "
198 "used, otherwise I<s> points to a buffer used to hold the terminal pathname.  "
199 "The symbolic constant B<L_ctermid> is the maximum number of characters in "
200 "the returned pathname."
201 msgstr ""
202
203 #. type: Plain text
204 #: build/C/man3/ctermid.3:61
205 msgid "The pointer to the pathname."
206 msgstr ""
207
208 #. type: SH
209 #: build/C/man3/ctermid.3:61 build/C/man3/fcloseall.3:55 build/C/man3/ferror.3:106 build/C/man3/fmtmsg.3:225 build/C/man3/stdio_ext.3:132 build/C/man3/tmpnam.3:77
210 #, no-wrap
211 msgid "ATTRIBUTES"
212 msgstr ""
213
214 #. type: SS
215 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56 build/C/man3/ferror.3:107 build/C/man3/fmtmsg.3:226 build/C/man3/stdio_ext.3:133 build/C/man3/tmpnam.3:78
216 #, no-wrap
217 msgid "Multithreading (see pthreads(7))"
218 msgstr ""
219
220 #. type: Plain text
221 #: build/C/man3/ctermid.3:67
222 msgid ""
223 "The B<ctermid>()  function is thread-safe with exceptions.  It is not "
224 "thread-safe if called with a NULL parameter."
225 msgstr ""
226
227 #. type: Plain text
228 #: build/C/man3/ctermid.3:69
229 msgid "Svr4, POSIX.1-2001."
230 msgstr ""
231
232 #. type: SH
233 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:213 build/C/man3/fopen.3:331 build/C/man3/gets.3:152 build/C/man3/getw.3:82 build/C/man2/link.2:181 build/C/man2/open.2:890 build/C/man3/popen.3:178 build/C/man3/printf.3:929 build/C/man3/puts.3:105 build/C/man2/readv.2:258 build/C/man3/remove.3:78 build/C/man2/rename.2:234 build/C/man2/rmdir.2:129 build/C/man3/scanf.3:646 build/C/man3/setbuf.3:170 build/C/man3/tempnam.3:158 build/C/man3/tmpnam.3:156 build/C/man2/unlink.2:145
234 #, no-wrap
235 msgid "BUGS"
236 msgstr ""
237
238 #. type: Plain text
239 #: build/C/man3/ctermid.3:73
240 msgid ""
241 "The path returned may not uniquely identify the controlling terminal; it "
242 "may, for example, be I</dev/tty>."
243 msgstr ""
244
245 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
246 #.  if ctermid() was given an argument; fixed in 2.4.
247 #. type: Plain text
248 #: build/C/man3/ctermid.3:77
249 msgid "It is not assured that the program can open the terminal."
250 msgstr ""
251
252 #. type: Plain text
253 #: build/C/man3/ctermid.3:79
254 msgid "B<ttyname>(3)"
255 msgstr ""
256
257 #. type: TH
258 #: build/C/man3/dprintf.3:26
259 #, no-wrap
260 msgid "DPRINTF"
261 msgstr ""
262
263 #. type: TH
264 #: build/C/man3/dprintf.3:26
265 #, no-wrap
266 msgid "2010-09-15"
267 msgstr ""
268
269 #. type: Plain text
270 #: build/C/man3/dprintf.3:29
271 msgid "dprintf, vdprintf - print to a file descriptor"
272 msgstr ""
273
274 #. type: Plain text
275 #: build/C/man3/dprintf.3:33
276 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
277 msgstr ""
278
279 #. type: Plain text
280 #: build/C/man3/dprintf.3:35
281 msgid "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
282 msgstr ""
283
284 #. type: Plain text
285 #: build/C/man3/dprintf.3:43
286 msgid "B<dprintf>(), B<vdprintf>():"
287 msgstr ""
288
289 #. type: TP
290 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37 build/C/man3/getline.3:49
291 #, no-wrap
292 msgid "Since glibc 2.10:"
293 msgstr ""
294
295 #. type: Plain text
296 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
297 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
298 msgstr ""
299
300 #. type: TP
301 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40 build/C/man3/getline.3:52
302 #, no-wrap
303 msgid "Before glibc 2.10:"
304 msgstr ""
305
306 #. type: Plain text
307 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43 build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
308 msgid "_GNU_SOURCE"
309 msgstr ""
310
311 #. type: Plain text
312 #: build/C/man3/dprintf.3:69
313 msgid ""
314 "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 "
315 "library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that "
316 "they output to a file descriptor I<fd> instead of to a I<stdio> stream."
317 msgstr ""
318
319 #.  .SH NOTES
320 #.  These functions are GNU extensions, not in C or POSIX.
321 #.  Clearly, the names were badly chosen.
322 #.  Many systems (like MacOS) have incompatible functions called
323 #.  .BR dprintf (),
324 #.  usually some debugging version of
325 #.  .BR printf (3),
326 #.  perhaps with a prototype like
327 #
328 #.  .BI "void dprintf(int level, const char *" format ", ...);"
329 #
330 #.  where the first argument is a debugging level (and output is to
331 #.  .IR stderr ).
332 #.  Moreover,
333 #.  .BR dprintf ()
334 #.  (or
335 #.  .BR DPRINTF )
336 #.  is also a popular macro name for a debugging printf.
337 #.  So, probably, it is better to avoid this function in programs
338 #.  intended to be portable.
339 #
340 #.  A better name would have been
341 #.  .BR fdprintf ().
342 #. type: Plain text
343 #: build/C/man3/dprintf.3:95
344 msgid ""
345 "These functions are GNU extensions that are nowadays specified in "
346 "POSIX.1-2008."
347 msgstr ""
348
349 #. type: Plain text
350 #: build/C/man3/dprintf.3:97
351 msgid "B<printf>(3)"
352 msgstr ""
353
354 #. type: TH
355 #: build/C/man3/fclose.3:44
356 #, no-wrap
357 msgid "FCLOSE"
358 msgstr ""
359
360 #. type: TH
361 #: build/C/man3/fclose.3:44
362 #, no-wrap
363 msgid "2009-02-23"
364 msgstr ""
365
366 #. type: Plain text
367 #: build/C/man3/fclose.3:47
368 msgid "fclose - close a stream"
369 msgstr ""
370
371 #. type: Plain text
372 #: build/C/man3/fclose.3:51
373 msgid "B<int fclose(FILE *>I<fp>B<);>"
374 msgstr ""
375
376 #. type: Plain text
377 #: build/C/man3/fclose.3:59
378 msgid ""
379 "The B<fclose>()  function flushes the stream pointed to by I<fp> (writing "
380 "any buffered output data using B<fflush>(3))  and closes the underlying file "
381 "descriptor."
382 msgstr ""
383
384 #. type: Plain text
385 #: build/C/man3/fclose.3:70
386 msgid ""
387 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
388 "I<errno> is set to indicate the error.  In either case any further access "
389 "(including another call to B<fclose>())  to the stream results in undefined "
390 "behavior."
391 msgstr ""
392
393 #. type: SH
394 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81 build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125 build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63 build/C/man3/fseek.3:136 build/C/man3/fseeko.3:84 build/C/man3/getline.3:125 build/C/man2/link.2:57 build/C/man2/llseek.2:69 build/C/man2/lseek.2:170 build/C/man2/open.2:485 build/C/man2/pipe.2:97 build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:85 build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:89 build/C/man3/tempnam.3:94 build/C/man3/tmpfile.3:56 build/C/man3/tmpnam.3:75 build/C/man2/unlink.2:60 build/C/man2/write.2:107
395 #, no-wrap
396 msgid "ERRORS"
397 msgstr ""
398
399 #. type: TP
400 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66 build/C/man3/fseek.3:137 build/C/man2/llseek.2:70 build/C/man2/lseek.2:171 build/C/man2/read.2:114 build/C/man3/scanf.3:553 build/C/man2/write.2:126
401 #, no-wrap
402 msgid "B<EBADF>"
403 msgstr ""
404
405 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
406 #.   low-level file operations on the same stream. If you do get this error,
407 #.   you must have closed the stream's low-level file descriptor using
408 #.   something like close(fileno(fp)).
409 #. type: Plain text
410 #: build/C/man3/fclose.3:80
411 msgid "The file descriptor underlying I<fp> is not valid."
412 msgstr ""
413
414 #. type: Plain text
415 #: build/C/man3/fclose.3:90
416 msgid ""
417 "The B<fclose>()  function may also fail and set I<errno> for any of the "
418 "errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
419 msgstr ""
420
421 #. type: Plain text
422 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:170 build/C/man3/puts.3:105
423 msgid "C89, C99."
424 msgstr ""
425
426 #. type: SH
427 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:99 build/C/man3/fgetwc.3:72 build/C/man3/fmemopen.3:207 build/C/man3/fmtmsg.3:252 build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70 build/C/man3/fseeko.3:89 build/C/man2/link.2:143 build/C/man2/llseek.2:84 build/C/man2/lseek.2:210 build/C/man2/open.2:655 build/C/man3/perror.3:124 build/C/man3/printf.3:867 build/C/man2/read.2:175 build/C/man2/readlink.2:130 build/C/man2/readv.2:226 build/C/man3/remove.3:72 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122 build/C/man2/symlink.2:155 build/C/man3/tempnam.3:103 build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:92 build/C/man3/wprintf.3:215 build/C/man2/write.2:194
428 #, no-wrap
429 msgid "NOTES"
430 msgstr ""
431
432 #. type: Plain text
433 #: build/C/man3/fclose.3:102
434 msgid ""
435 "Note that B<fclose>()  only flushes the user-space buffers provided by the C "
436 "library.  To ensure that the data is physically stored on disk the kernel "
437 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
438 msgstr ""
439
440 #. type: Plain text
441 #: build/C/man3/fclose.3:108
442 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
443 msgstr ""
444
445 #. type: TH
446 #: build/C/man3/fcloseall.3:25
447 #, no-wrap
448 msgid "FCLOSEALL"
449 msgstr ""
450
451 #. type: Plain text
452 #: build/C/man3/fcloseall.3:28
453 msgid "fcloseall - close all open streams"
454 msgstr ""
455
456 #. type: Plain text
457 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
458 #, no-wrap
459 msgid ""
460 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
461 "B<#include E<lt>stdio.hE<gt>>\n"
462 msgstr ""
463
464 #. type: Plain text
465 #: build/C/man3/fcloseall.3:34
466 #, no-wrap
467 msgid "B<int fcloseall(void);>\n"
468 msgstr ""
469
470 #. type: Plain text
471 #: build/C/man3/fcloseall.3:43
472 msgid ""
473 "The B<fcloseall>()  function closes all of the calling process's open "
474 "streams.  Buffered output for each stream is written before it is closed (as "
475 "for B<fflush>(3)); buffered input is discarded."
476 msgstr ""
477
478 #. type: Plain text
479 #: build/C/man3/fcloseall.3:50
480 msgid "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
481 msgstr ""
482
483 #. type: Plain text
484 #: build/C/man3/fcloseall.3:55
485 msgid ""
486 "This function returns 0 if all files were successfully closed; on error, "
487 "B<EOF> is returned."
488 msgstr ""
489
490 #. type: Plain text
491 #: build/C/man3/fcloseall.3:60
492 msgid ""
493 "The B<fcloseall>()  function does not lock the streams, so it is not "
494 "thread-safe."
495 msgstr ""
496
497 #. type: Plain text
498 #: build/C/man3/fcloseall.3:62
499 msgid "This function is a GNU extension."
500 msgstr ""
501
502 #. type: Plain text
503 #: build/C/man3/fcloseall.3:68
504 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
505 msgstr ""
506
507 #. type: TH
508 #: build/C/man3/ferror.3:44
509 #, no-wrap
510 msgid "FERROR"
511 msgstr ""
512
513 #. type: Plain text
514 #: build/C/man3/ferror.3:47
515 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
516 msgstr ""
517
518 #. type: Plain text
519 #: build/C/man3/ferror.3:51
520 msgid "B<void clearerr(FILE *>I<stream>B<);>"
521 msgstr ""
522
523 #. type: Plain text
524 #: build/C/man3/ferror.3:53
525 msgid "B<int feof(FILE *>I<stream>B<);>"
526 msgstr ""
527
528 #. type: Plain text
529 #: build/C/man3/ferror.3:55
530 msgid "B<int ferror(FILE *>I<stream>B<);>"
531 msgstr ""
532
533 #. type: Plain text
534 #: build/C/man3/ferror.3:57
535 msgid "B<int fileno(FILE *>I<stream>B<);>"
536 msgstr ""
537
538 #. type: Plain text
539 #: build/C/man3/ferror.3:65
540 msgid "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
541 msgstr ""
542
543 #. type: Plain text
544 #: build/C/man3/ferror.3:70
545 msgid ""
546 "The function B<clearerr>()  clears the end-of-file and error indicators for "
547 "the stream pointed to by I<stream>."
548 msgstr ""
549
550 #. type: Plain text
551 #: build/C/man3/ferror.3:78
552 msgid ""
553 "The function B<feof>()  tests the end-of-file indicator for the stream "
554 "pointed to by I<stream>, returning nonzero if it is set.  The end-of-file "
555 "indicator can be cleared only by the function B<clearerr>()."
556 msgstr ""
557
558 #. type: Plain text
559 #: build/C/man3/ferror.3:87
560 msgid ""
561 "The function B<ferror>()  tests the error indicator for the stream pointed "
562 "to by I<stream>, returning nonzero if it is set.  The error indicator can be "
563 "reset only by the B<clearerr>()  function."
564 msgstr ""
565
566 #. type: Plain text
567 #: build/C/man3/ferror.3:93
568 msgid ""
569 "The function B<fileno>()  examines the argument I<stream> and returns its "
570 "integer descriptor."
571 msgstr ""
572
573 #. type: Plain text
574 #: build/C/man3/ferror.3:96 build/C/man3/fgetwc.3:55 build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/gets.3:111 build/C/man3/puts.3:84
575 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
576 msgstr ""
577
578 #. type: Plain text
579 #: build/C/man3/ferror.3:106
580 msgid ""
581 "These functions should not fail and do not set the external variable "
582 "I<errno>.  (However, in case B<fileno>()  detects that its argument is not a "
583 "valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
584 msgstr ""
585
586 #. type: Plain text
587 #: build/C/man3/ferror.3:115
588 msgid ""
589 "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are "
590 "thread-safe."
591 msgstr ""
592
593 #. type: Plain text
594 #: build/C/man3/ferror.3:122
595 msgid ""
596 "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89 and "
597 "C99."
598 msgstr ""
599
600 #. type: Plain text
601 #: build/C/man3/ferror.3:127
602 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
603 msgstr ""
604
605 #. type: TH
606 #: build/C/man3/fflush.3:45
607 #, no-wrap
608 msgid "FFLUSH"
609 msgstr ""
610
611 #. type: TH
612 #: build/C/man3/fflush.3:45
613 #, no-wrap
614 msgid "2009-09-06"
615 msgstr ""
616
617 #. type: Plain text
618 #: build/C/man3/fflush.3:48
619 msgid "fflush - flush a stream"
620 msgstr ""
621
622 #. type: Plain text
623 #: build/C/man3/fflush.3:52
624 msgid "B<int fflush(FILE *>I<stream>B<);>"
625 msgstr ""
626
627 #. type: Plain text
628 #: build/C/man3/fflush.3:63
629 msgid ""
630 "For output streams, B<fflush>()  forces a write of all user-space buffered "
631 "data for the given output or update I<stream> via the stream's underlying "
632 "write function.  For input streams, B<fflush>()  discards any buffered data "
633 "that has been fetched from the underlying file, but has not been consumed by "
634 "the application.  The open status of the stream is unaffected."
635 msgstr ""
636
637 #. type: Plain text
638 #: build/C/man3/fflush.3:71
639 msgid ""
640 "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output "
641 "streams."
642 msgstr ""
643
644 #. type: Plain text
645 #: build/C/man3/fflush.3:74
646 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
647 msgstr ""
648
649 #. type: Plain text
650 #: build/C/man3/fflush.3:81
651 msgid ""
652 "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and "
653 "I<errno> is set to indicate the error."
654 msgstr ""
655
656 #. type: Plain text
657 #: build/C/man3/fflush.3:86
658 msgid "I<Stream> is not an open stream, or is not open for writing."
659 msgstr ""
660
661 #. type: Plain text
662 #: build/C/man3/fflush.3:93
663 msgid ""
664 "The function B<fflush>()  may also fail and set I<errno> for any of the "
665 "errors specified for B<write>(2)."
666 msgstr ""
667
668 #. type: Plain text
669 #: build/C/man3/fflush.3:95
670 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
671 msgstr ""
672
673 #.  Verified on: Solaris 8.
674 #. type: Plain text
675 #: build/C/man3/fflush.3:99
676 msgid ""
677 "The standards do not specify the behavior for input streams.  Most other "
678 "implementations behave the same as Linux."
679 msgstr ""
680
681 #. type: Plain text
682 #: build/C/man3/fflush.3:108
683 msgid ""
684 "Note that B<fflush>()  only flushes the user-space buffers provided by the C "
685 "library.  To ensure that the data is physically stored on disk the kernel "
686 "buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
687 msgstr ""
688
689 #. type: Plain text
690 #: build/C/man3/fflush.3:116
691 msgid ""
692 "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), "
693 "B<setbuf>(3), B<unlocked_stdio>(3)"
694 msgstr ""
695
696 #. type: TH
697 #: build/C/man3/fgetwc.3:18
698 #, no-wrap
699 msgid "FGETWC"
700 msgstr ""
701
702 #. type: TH
703 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/getline.3:26 build/C/man3/popen.3:40 build/C/man3/tempnam.3:25
704 #, no-wrap
705 msgid "2013-04-19"
706 msgstr ""
707
708 #. type: Plain text
709 #: build/C/man3/fgetwc.3:21
710 msgid "fgetwc, getwc - read a wide character from a FILE stream"
711 msgstr ""
712
713 #. type: Plain text
714 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22 build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
715 #, no-wrap
716 msgid "B<#include E<lt>wchar.hE<gt>>\n"
717 msgstr ""
718
719 #. type: Plain text
720 #: build/C/man3/fgetwc.3:29
721 #, no-wrap
722 msgid ""
723 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
724 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
725 msgstr ""
726
727 #. type: Plain text
728 #: build/C/man3/fgetwc.3:44
729 msgid ""
730 "The B<fgetwc>()  function is the wide-character equivalent of the "
731 "B<fgetc>(3)  function.  It reads a wide character from I<stream> and returns "
732 "it.  If the end of stream is reached, or if I<ferror(stream)> becomes true, "
733 "it returns B<WEOF>.  If a wide-character conversion error occurs, it sets "
734 "I<errno> to B<EILSEQ> and returns B<WEOF>."
735 msgstr ""
736
737 #. type: Plain text
738 #: build/C/man3/fgetwc.3:52
739 msgid ""
740 "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It "
741 "may be implemented as a macro, and may evaluate its argument more than "
742 "once.  There is no reason ever to use it."
743 msgstr ""
744
745 #. type: Plain text
746 #: build/C/man3/fgetwc.3:64
747 msgid ""
748 "The B<fgetwc>()  function returns the next wide-character from the stream, "
749 "or B<WEOF>.  In the event of an error, I<errno> is set to indicate the "
750 "cause."
751 msgstr ""
752
753 #. type: Plain text
754 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
755 msgid "Apart from the usual ones, there is"
756 msgstr ""
757
758 #. type: TP
759 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
760 #, no-wrap
761 msgid "B<EILSEQ>"
762 msgstr ""
763
764 #. type: Plain text
765 #: build/C/man3/fgetwc.3:70
766 msgid "The data obtained from the input stream does not form a valid character."
767 msgstr ""
768
769 #. type: Plain text
770 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
771 msgid "C99, POSIX.1-2001."
772 msgstr ""
773
774 #. type: Plain text
775 #: build/C/man3/fgetwc.3:79
776 msgid ""
777 "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the "
778 "current locale."
779 msgstr ""
780
781 #. type: Plain text
782 #: build/C/man3/fgetwc.3:87
783 msgid ""
784 "In the absence of additional information passed to the B<fopen>(3)  call, it "
785 "is reasonable to expect that B<fgetwc>()  will actually read a multibyte "
786 "sequence from the stream and then convert it to a wide character."
787 msgstr ""
788
789 #. type: Plain text
790 #: build/C/man3/fgetwc.3:92
791 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
792 msgstr ""
793
794 #. type: TH
795 #: build/C/man3/flockfile.3:25
796 #, no-wrap
797 msgid "FLOCKFILE"
798 msgstr ""
799
800 #. type: TH
801 #: build/C/man3/flockfile.3:25 build/C/man3/unlocked_stdio.3:25
802 #, no-wrap
803 msgid "2008-08-29"
804 msgstr ""
805
806 #. type: Plain text
807 #: build/C/man3/flockfile.3:28
808 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
809 msgstr ""
810
811 #. type: Plain text
812 #: build/C/man3/flockfile.3:33
813 #, no-wrap
814 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
815 msgstr ""
816
817 #. type: Plain text
818 #: build/C/man3/flockfile.3:35
819 #, no-wrap
820 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
821 msgstr ""
822
823 #. type: Plain text
824 #: build/C/man3/flockfile.3:37
825 #, no-wrap
826 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
827 msgstr ""
828
829 #. type: Plain text
830 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
831 msgid "All functions shown above:"
832 msgstr ""
833
834 #. type: Plain text
835 #: build/C/man3/flockfile.3:49
836 msgid ""
837 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE "
838 "|| _POSIX_SOURCE"
839 msgstr ""
840
841 #. type: Plain text
842 #: build/C/man3/flockfile.3:63
843 msgid ""
844 "The stdio functions are thread-safe.  This is achieved by assigning to each "
845 "I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning "
846 "thread.  For each library call, these functions wait until the I<FILE> "
847 "object is no longer locked by a different thread, then lock it, do the "
848 "requested I/O, and unlock the object again."
849 msgstr ""
850
851 #. type: Plain text
852 #: build/C/man3/flockfile.3:69
853 msgid ""
854 "(Note: this locking has nothing to do with the file locking done by "
855 "functions like B<flock>(2)  and B<lockf>(3).)"
856 msgstr ""
857
858 #. type: Plain text
859 #: build/C/man3/flockfile.3:77
860 msgid ""
861 "All this is invisible to the C-programmer, but there may be two reasons to "
862 "wish for more detailed control.  On the one hand, maybe a series of I/O "
863 "actions by one thread belongs together, and should not be interrupted by the "
864 "I/O of some other thread.  On the other hand, maybe the locking overhead "
865 "should be avoided for greater efficiency."
866 msgstr ""
867
868 #. type: Plain text
869 #: build/C/man3/flockfile.3:94
870 msgid ""
871 "To this end, a thread can explicitly lock the I<FILE> object, then do its "
872 "series of I/O actions, then unlock.  This prevents other threads from coming "
873 "in between.  If the reason for doing this was to achieve greater efficiency, "
874 "one does the I/O with the nonlocking versions of the stdio functions: with "
875 "B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and "
876 "B<putc>(3)."
877 msgstr ""
878
879 #. type: Plain text
880 #: build/C/man3/flockfile.3:105
881 msgid ""
882 "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked "
883 "by a different thread, then makes the current thread owner of "
884 "I<*filehandle>, and increments the lockcount."
885 msgstr ""
886
887 #. type: Plain text
888 #: build/C/man3/flockfile.3:109
889 msgid "The B<funlockfile>()  function decrements the lock count."
890 msgstr ""
891
892 #. type: Plain text
893 #: build/C/man3/flockfile.3:120
894 msgid ""
895 "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  "
896 "It does nothing in case some other thread owns I<*filehandle>, and it "
897 "obtains ownership and increments the lockcount otherwise."
898 msgstr ""
899
900 #. type: Plain text
901 #: build/C/man3/flockfile.3:125
902 msgid ""
903 "The B<ftrylockfile>()  function returns zero for success (the lock was "
904 "obtained), and nonzero for failure."
905 msgstr ""
906
907 #. type: Plain text
908 #: build/C/man3/flockfile.3:127
909 msgid "None."
910 msgstr ""
911
912 #. type: Plain text
913 #: build/C/man3/flockfile.3:129 build/C/man3/popen.3:174
914 msgid "POSIX.1-2001."
915 msgstr ""
916
917 #. type: SH
918 #: build/C/man3/flockfile.3:129
919 #, no-wrap
920 msgid "AVAILABILITY"
921 msgstr ""
922
923 #. type: Plain text
924 #: build/C/man3/flockfile.3:135
925 msgid ""
926 "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
927 "defined.  They are in libc since libc 5.1.1 and in glibc since glibc 2.0."
928 msgstr ""
929
930 #. type: Plain text
931 #: build/C/man3/flockfile.3:137
932 msgid "B<unlocked_stdio>(3)"
933 msgstr ""
934
935 #. type: TH
936 #: build/C/man3/fmemopen.3:10
937 #, no-wrap
938 msgid "FMEMOPEN"
939 msgstr ""
940
941 #. type: TH
942 #: build/C/man3/fmemopen.3:10
943 #, no-wrap
944 msgid "2012-04-28"
945 msgstr ""
946
947 #. type: Plain text
948 #: build/C/man3/fmemopen.3:13
949 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
950 msgstr ""
951
952 #. type: Plain text
953 #: build/C/man3/fmemopen.3:18
954 #, no-wrap
955 msgid ""
956 "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char "
957 "*>I<mode>B<);>\n"
958 msgstr ""
959
960 #. type: Plain text
961 #: build/C/man3/fmemopen.3:20
962 #, no-wrap
963 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
964 msgstr ""
965
966 #. type: Plain text
967 #: build/C/man3/fmemopen.3:24
968 #, no-wrap
969 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
970 msgstr ""
971
972 #. type: Plain text
973 #: build/C/man3/fmemopen.3:34
974 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
975 msgstr ""
976
977 #. type: Plain text
978 #: build/C/man3/fmemopen.3:57
979 msgid ""
980 "The B<fmemopen>()  function opens a stream that permits the access specified "
981 "by I<mode>.  The stream allows I/O to be performed on the string or memory "
982 "buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes "
983 "long."
984 msgstr ""
985
986 #. type: Plain text
987 #: build/C/man3/fmemopen.3:77
988 msgid ""
989 "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies "
990 "an append mode, then the initial file position is set to the location of the "
991 "first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file "
992 "position is set to the start of the buffer.  Since glibc 2.9, the letter "
993 "\\(aqb\\(aq may be specified as the second character in I<mode>.  This "
994 "provides \"binary\" mode: writes don't implicitly add a terminating null "
995 "byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer "
996 "(i.e., the value specified by the I<size> argument), rather than the current "
997 "string length."
998 msgstr ""
999
1000 #. type: Plain text
1001 #: build/C/man3/fmemopen.3:89
1002 msgid ""
1003 "When a stream that has been opened for writing is flushed (B<fflush>(3))  or "
1004 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
1005 "there is space.  The caller should ensure that an extra byte is available in "
1006 "the buffer (and that I<size> counts that byte)  to allow for this."
1007 msgstr ""
1008
1009 #.  See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
1010 #.  and
1011 #.  http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
1012 #. type: Plain text
1013 #: build/C/man3/fmemopen.3:107
1014 msgid ""
1015 "Attempts to write more than I<size> bytes to the buffer result in an error.  "
1016 "(By default, such errors will be visible only when the I<stdio> buffer is "
1017 "flushed.  Disabling buffering with I<setbuf(fp,\\ NULL)> may be useful to "
1018 "detect errors at the time of an output operation.  Alternatively, the caller "
1019 "can explicitly set I<buf> as the stdio stream buffer, at the same time "
1020 "informing stdio of the buffer's size, using I<setbuffer(fp, buf, size)>.)"
1021 msgstr ""
1022
1023 #. type: Plain text
1024 #: build/C/man3/fmemopen.3:115
1025 msgid ""
1026 "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do "
1027 "not cause read operations to return an end-of-file indication.  A read from "
1028 "the buffer will only indicate end-of-file when the file pointer advances "
1029 "I<size> bytes past the start of the buffer."
1030 msgstr ""
1031
1032 #. type: Plain text
1033 #: build/C/man3/fmemopen.3:130
1034 msgid ""
1035 "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a "
1036 "buffer I<size> bytes long.  This is useful for an application that wants to "
1037 "write data to a temporary buffer and then read it back again.  The buffer is "
1038 "automatically freed when the stream is closed.  Note that the caller has no "
1039 "way to obtain a pointer to the temporary buffer allocated by this call (but "
1040 "see B<open_memstream>()  below)."
1041 msgstr ""
1042
1043 #. type: Plain text
1044 #: build/C/man3/fmemopen.3:141
1045 msgid ""
1046 "The B<open_memstream>()  function opens a stream for writing to a buffer.  "
1047 "The buffer is dynamically allocated (as with B<malloc>(3)), and "
1048 "automatically grows as required.  After closing the stream, the caller "
1049 "should B<free>(3)  this buffer."
1050 msgstr ""
1051
1052 #. type: Plain text
1053 #: build/C/man3/fmemopen.3:156
1054 msgid ""
1055 "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the "
1056 "locations pointed to by I<ptr> and I<sizeloc> are updated to contain, "
1057 "respectively, a pointer to the buffer and the current size of the buffer.  "
1058 "These values remain valid only as long as the caller performs no further "
1059 "output on the stream.  If further output is performed, then the stream must "
1060 "again be flushed before trying to access these variables."
1061 msgstr ""
1062
1063 #. type: Plain text
1064 #: build/C/man3/fmemopen.3:162
1065 msgid ""
1066 "A null byte is maintained at the end of the buffer.  This byte is I<not> "
1067 "included in the size value stored at I<sizeloc>."
1068 msgstr ""
1069
1070 #. type: Plain text
1071 #: build/C/man3/fmemopen.3:170
1072 msgid ""
1073 "The stream's file position can be changed with B<fseek>(3)  or "
1074 "B<fseeko>(3).  Moving the file position past the end of the data already "
1075 "written fills the intervening space with zeros."
1076 msgstr ""
1077
1078 #. type: Plain text
1079 #: build/C/man3/fmemopen.3:176
1080 msgid ""
1081 "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on "
1082 "wide characters instead of bytes."
1083 msgstr ""
1084
1085 #. type: Plain text
1086 #: build/C/man3/fmemopen.3:188
1087 msgid ""
1088 "Upon successful completion B<fmemopen>(), B<open_memstream>()  and "
1089 "B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned "
1090 "and I<errno> is set to indicate the error."
1091 msgstr ""
1092
1093 #. type: SH
1094 #: build/C/man3/fmemopen.3:188 build/C/man3/fmtmsg.3:222 build/C/man3/getline.3:135 build/C/man2/pipe.2:113 build/C/man2/readv.2:209
1095 #, no-wrap
1096 msgid "VERSIONS"
1097 msgstr ""
1098
1099 #. type: Plain text
1100 #: build/C/man3/fmemopen.3:195
1101 msgid ""
1102 "B<fmemopen>()  and B<open_memstream>()  were already available in glibc "
1103 "1.0.x.  B<open_wmemstream>()  is available since glibc 2.4."
1104 msgstr ""
1105
1106 #. type: Plain text
1107 #: build/C/man3/fmemopen.3:199
1108 msgid ""
1109 "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are "
1110 "not widely available on other systems."
1111 msgstr ""
1112
1113 #.  http://austingroupbugs.net/view.php?id=396
1114 #. type: Plain text
1115 #: build/C/man3/fmemopen.3:207
1116 msgid ""
1117 "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  "
1118 "However, Technical Corrigendum 1 adjusts the standard to allow "
1119 "implementation-specific treatment for this case, thus permitting the glibc "
1120 "treatment of \\(aqb\\(aq."
1121 msgstr ""
1122
1123 #. type: Plain text
1124 #: build/C/man3/fmemopen.3:213
1125 msgid ""
1126 "There is no file descriptor associated with the file stream returned by "
1127 "these functions (i.e., B<fileno>(3)  will return an error if called on the "
1128 "returned stream)."
1129 msgstr ""
1130
1131 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1132 #. type: Plain text
1133 #: build/C/man3/fmemopen.3:220
1134 msgid ""
1135 "In glibc before version 2.7, seeking past the end of a stream created by "
1136 "B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  "
1137 "call fails, returning -1."
1138 msgstr ""
1139
1140 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1141 #. type: Plain text
1142 #: build/C/man3/fmemopen.3:231
1143 msgid ""
1144 "If I<size> is specified as zero, B<fmemopen>()  fails with the error "
1145 "B<EINVAL>.  It would be more consistent if this case successfully created a "
1146 "stream that then returned end of file on the first attempt at reading.  "
1147 "Furthermore, POSIX.1-2008 does not specify a failure for this case."
1148 msgstr ""
1149
1150 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1151 #. type: Plain text
1152 #: build/C/man3/fmemopen.3:239
1153 msgid ""
1154 "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial "
1155 "file position to the first null byte, but (if the file offset is reset to a "
1156 "location other than the end of the stream)  does not force subsequent writes "
1157 "to append at the end of the stream."
1158 msgstr ""
1159
1160 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1161 #. type: Plain text
1162 #: build/C/man3/fmemopen.3:255
1163 msgid ""
1164 "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or "
1165 "\"a+\"), and the I<size> argument does not cover a null byte in I<buf> then, "
1166 "according to POSIX.1-2008, the initial file position should be set to the "
1167 "next byte after the end of the buffer.  However, in this case the glibc "
1168 "B<fmemopen>()  sets the file position to -1."
1169 msgstr ""
1170
1171 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1172 #. type: Plain text
1173 #: build/C/man3/fmemopen.3:268
1174 msgid ""
1175 "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the "
1176 "I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired "
1177 "effect, but \"w+b\" does not.  This is inconsistent with the treatment of "
1178 "I<mode> by B<fopen>(3)."
1179 msgstr ""
1180
1181 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1182 #. type: Plain text
1183 #: build/C/man3/fmemopen.3:276
1184 msgid ""
1185 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently "
1186 "changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1187 msgstr ""
1188
1189 #. type: SH
1190 #: build/C/man3/fmemopen.3:276 build/C/man3/fmtmsg.3:256 build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144 build/C/man2/pipe.2:124 build/C/man3/printf.3:973 build/C/man2/readlink.2:157 build/C/man2/readv.2:265 build/C/man3/scanf.3:681
1191 #, no-wrap
1192 msgid "EXAMPLE"
1193 msgstr ""
1194
1195 #. type: Plain text
1196 #: build/C/man3/fmemopen.3:286
1197 msgid ""
1198 "The program below uses B<fmemopen>()  to open an input buffer, and "
1199 "B<open_memstream>()  to open a dynamically sized output buffer.  The program "
1200 "scans its input string (taken from the program's first command-line "
1201 "argument) reading integers, and writes the squares of these integers to the "
1202 "output buffer.  An example of the output produced by this program is the "
1203 "following:"
1204 msgstr ""
1205
1206 #. type: Plain text
1207 #: build/C/man3/fmemopen.3:291
1208 #, no-wrap
1209 msgid ""
1210 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1211 "size=11; ptr=1 529 1849\n"
1212 msgstr ""
1213
1214 #. type: SS
1215 #: build/C/man3/fmemopen.3:293 build/C/man3/fopencookie.3:271
1216 #, no-wrap
1217 msgid "Program source"
1218 msgstr ""
1219
1220 #. type: Plain text
1221 #: build/C/man3/fmemopen.3:300
1222 #, no-wrap
1223 msgid ""
1224 "#define _GNU_SOURCE\n"
1225 "#include E<lt>string.hE<gt>\n"
1226 "#include E<lt>stdio.hE<gt>\n"
1227 "#include E<lt>stdlib.hE<gt>\n"
1228 msgstr ""
1229
1230 #. type: Plain text
1231 #: build/C/man3/fmemopen.3:303
1232 #, no-wrap
1233 msgid ""
1234 "#define handle_error(msg) \\e\n"
1235 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1236 msgstr ""
1237
1238 #. type: Plain text
1239 #: build/C/man3/fmemopen.3:311
1240 #, no-wrap
1241 msgid ""
1242 "int\n"
1243 "main(int argc, char *argv[])\n"
1244 "{\n"
1245 "    FILE *out, *in;\n"
1246 "    int v, s;\n"
1247 "    size_t size;\n"
1248 "    char *ptr;\n"
1249 msgstr ""
1250
1251 #. type: Plain text
1252 #: build/C/man3/fmemopen.3:316
1253 #, no-wrap
1254 msgid ""
1255 "    if (argc != 2) {\n"
1256 "\tfprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1257 "\texit(EXIT_FAILURE);\n"
1258 "    }\n"
1259 msgstr ""
1260
1261 #. type: Plain text
1262 #: build/C/man3/fmemopen.3:320
1263 #, no-wrap
1264 msgid ""
1265 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1266 "    if (in == NULL)\n"
1267 "        handle_error(\"fmemopen\");\n"
1268 msgstr ""
1269
1270 #. type: Plain text
1271 #: build/C/man3/fmemopen.3:324
1272 #, no-wrap
1273 msgid ""
1274 "    out = open_memstream(&ptr, &size);\n"
1275 "    if (out == NULL)\n"
1276 "        handle_error(\"open_memstream\");\n"
1277 msgstr ""
1278
1279 #. type: Plain text
1280 #: build/C/man3/fmemopen.3:329
1281 #, no-wrap
1282 msgid ""
1283 "    for (;;) {\n"
1284 "        s = fscanf(in, \"%d\", &v);\n"
1285 "        if (s E<lt>= 0)\n"
1286 "            break;\n"
1287 msgstr ""
1288
1289 #. type: Plain text
1290 #: build/C/man3/fmemopen.3:340
1291 #, no-wrap
1292 msgid ""
1293 "        s = fprintf(out, \"%d \", v * v);\n"
1294 "        if (s == -1)\n"
1295 "            handle_error(\"fprintf\");\n"
1296 "    }\n"
1297 "    fclose(in);\n"
1298 "    fclose(out);\n"
1299 "    printf(\"size=%ld; ptr=%s\\en\", (long) size, ptr);\n"
1300 "    free(ptr);\n"
1301 "    exit(EXIT_SUCCESS);\n"
1302 "}\n"
1303 msgstr ""
1304
1305 #. type: Plain text
1306 #: build/C/man3/fmemopen.3:344
1307 msgid "B<fopen>(3), B<fopencookie>(3)"
1308 msgstr ""
1309
1310 #. type: TH
1311 #: build/C/man3/fmtmsg.3:13
1312 #, no-wrap
1313 msgid "FMTMSG"
1314 msgstr ""
1315
1316 #. type: Plain text
1317 #: build/C/man3/fmtmsg.3:16
1318 msgid "fmtmsg - print formatted error messages"
1319 msgstr ""
1320
1321 #. type: Plain text
1322 #: build/C/man3/fmtmsg.3:19
1323 #, no-wrap
1324 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1325 msgstr ""
1326
1327 #. type: Plain text
1328 #: build/C/man3/fmtmsg.3:21
1329 #, no-wrap
1330 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1331 msgstr ""
1332
1333 #. type: Plain text
1334 #: build/C/man3/fmtmsg.3:23
1335 #, no-wrap
1336 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1337 msgstr ""
1338
1339 #. type: Plain text
1340 #: build/C/man3/fmtmsg.3:25
1341 #, no-wrap
1342 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1343 msgstr ""
1344
1345 #. type: Plain text
1346 #: build/C/man3/fmtmsg.3:36
1347 msgid ""
1348 "This function displays a message described by its arguments on the device(s)  "
1349 "specified in the I<classification> argument.  For messages written to "
1350 "I<stderr>, the format depends on the B<MSGVERB> environment variable."
1351 msgstr ""
1352
1353 #. type: Plain text
1354 #: build/C/man3/fmtmsg.3:43
1355 msgid ""
1356 "The I<label> argument identifies the source of the message.  The string must "
1357 "consist of two colon separated parts where the first part has not more than "
1358 "10 and the second part not more than 14 characters."
1359 msgstr ""
1360
1361 #. type: Plain text
1362 #: build/C/man3/fmtmsg.3:47
1363 msgid "The I<text> argument describes the condition of the error."
1364 msgstr ""
1365
1366 #. type: Plain text
1367 #: build/C/man3/fmtmsg.3:52
1368 msgid ""
1369 "The I<action> argument describes possible steps to recover from the error.  "
1370 "If it is printed, it is prefixed by \"TO FIX: \"."
1371 msgstr ""
1372
1373 #. type: Plain text
1374 #: build/C/man3/fmtmsg.3:60
1375 msgid ""
1376 "The I<tag> argument is a reference to the online documentation where more "
1377 "information can be found.  It should contain the I<label> value and a unique "
1378 "identification number."
1379 msgstr ""
1380
1381 #. type: SS
1382 #: build/C/man3/fmtmsg.3:60
1383 #, no-wrap
1384 msgid "Dummy arguments"
1385 msgstr ""
1386
1387 #. type: Plain text
1388 #: build/C/man3/fmtmsg.3:79
1389 msgid ""
1390 "Each of the arguments can have a dummy value.  The dummy classification "
1391 "value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  "
1392 "The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  "
1393 "The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are "
1394 "synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a "
1395 "synonym for B<NO_SEV>."
1396 msgstr ""
1397
1398 #. type: SS
1399 #: build/C/man3/fmtmsg.3:79
1400 #, no-wrap
1401 msgid "The classification argument"
1402 msgstr ""
1403
1404 #. type: Plain text
1405 #: build/C/man3/fmtmsg.3:83
1406 msgid ""
1407 "The I<classification> argument is the sum of values describing 4 types of "
1408 "information."
1409 msgstr ""
1410
1411 #. type: Plain text
1412 #: build/C/man3/fmtmsg.3:86
1413 msgid "The first value defines the output channel."
1414 msgstr ""
1415
1416 #. type: TP
1417 #: build/C/man3/fmtmsg.3:86
1418 #, no-wrap
1419 msgid "B<MM_PRINT>"
1420 msgstr ""
1421
1422 #. type: Plain text
1423 #: build/C/man3/fmtmsg.3:90
1424 msgid "Output to I<stderr>."
1425 msgstr ""
1426
1427 #. type: TP
1428 #: build/C/man3/fmtmsg.3:90
1429 #, no-wrap
1430 msgid "B<MM_CONSOLE>"
1431 msgstr ""
1432
1433 #. type: Plain text
1434 #: build/C/man3/fmtmsg.3:93
1435 msgid "Output to the system console."
1436 msgstr ""
1437
1438 #. type: TP
1439 #: build/C/man3/fmtmsg.3:93
1440 #, no-wrap
1441 msgid "B<MM_PRINT | MM_CONSOLE>"
1442 msgstr ""
1443
1444 #. type: Plain text
1445 #: build/C/man3/fmtmsg.3:96
1446 msgid "Output to both."
1447 msgstr ""
1448
1449 #. type: Plain text
1450 #: build/C/man3/fmtmsg.3:98
1451 msgid "The second value is the source of the error:"
1452 msgstr ""
1453
1454 #. type: TP
1455 #: build/C/man3/fmtmsg.3:98
1456 #, no-wrap
1457 msgid "B<MM_HARD>"
1458 msgstr ""
1459
1460 #. type: Plain text
1461 #: build/C/man3/fmtmsg.3:101
1462 msgid "A hardware error occurred."
1463 msgstr ""
1464
1465 #. type: TP
1466 #: build/C/man3/fmtmsg.3:101
1467 #, no-wrap
1468 msgid "B<MM_FIRM>"
1469 msgstr ""
1470
1471 #. type: Plain text
1472 #: build/C/man3/fmtmsg.3:104
1473 msgid "A firmware error occurred."
1474 msgstr ""
1475
1476 #. type: TP
1477 #: build/C/man3/fmtmsg.3:104
1478 #, no-wrap
1479 msgid "B<MM_SOFT>"
1480 msgstr ""
1481
1482 #. type: Plain text
1483 #: build/C/man3/fmtmsg.3:107
1484 msgid "A software error occurred."
1485 msgstr ""
1486
1487 #. type: Plain text
1488 #: build/C/man3/fmtmsg.3:109
1489 msgid "The third value encodes the detector of the problem:"
1490 msgstr ""
1491
1492 #. type: TP
1493 #: build/C/man3/fmtmsg.3:109
1494 #, no-wrap
1495 msgid "B<MM_APPL>"
1496 msgstr ""
1497
1498 #. type: Plain text
1499 #: build/C/man3/fmtmsg.3:112
1500 msgid "It is detected by an application."
1501 msgstr ""
1502
1503 #. type: TP
1504 #: build/C/man3/fmtmsg.3:112
1505 #, no-wrap
1506 msgid "B<MM_UTIL>"
1507 msgstr ""
1508
1509 #. type: Plain text
1510 #: build/C/man3/fmtmsg.3:115
1511 msgid "It is detected by a utility."
1512 msgstr ""
1513
1514 #. type: TP
1515 #: build/C/man3/fmtmsg.3:115
1516 #, no-wrap
1517 msgid "B<MM_OPSYS>"
1518 msgstr ""
1519
1520 #. type: Plain text
1521 #: build/C/man3/fmtmsg.3:118
1522 msgid "It is detected by the operating system."
1523 msgstr ""
1524
1525 #. type: Plain text
1526 #: build/C/man3/fmtmsg.3:120
1527 msgid "The fourth value shows the severity of the incident:"
1528 msgstr ""
1529
1530 #. type: TP
1531 #: build/C/man3/fmtmsg.3:120
1532 #, no-wrap
1533 msgid "B<MM_RECOVER>"
1534 msgstr ""
1535
1536 #. type: Plain text
1537 #: build/C/man3/fmtmsg.3:123
1538 msgid "It is a recoverable error."
1539 msgstr ""
1540
1541 #. type: TP
1542 #: build/C/man3/fmtmsg.3:123
1543 #, no-wrap
1544 msgid "B<MM_NRECOV>"
1545 msgstr ""
1546
1547 #. type: Plain text
1548 #: build/C/man3/fmtmsg.3:126
1549 msgid "It is a nonrecoverable error."
1550 msgstr ""
1551
1552 #. type: SS
1553 #: build/C/man3/fmtmsg.3:126
1554 #, no-wrap
1555 msgid "The severity argument"
1556 msgstr ""
1557
1558 #. type: Plain text
1559 #: build/C/man3/fmtmsg.3:130
1560 msgid "The I<severity> argument can take one of the following values:"
1561 msgstr ""
1562
1563 #. type: TP
1564 #: build/C/man3/fmtmsg.3:130
1565 #, no-wrap
1566 msgid "B<MM_NOSEV>"
1567 msgstr ""
1568
1569 #. type: Plain text
1570 #: build/C/man3/fmtmsg.3:133
1571 msgid "No severity is printed."
1572 msgstr ""
1573
1574 #. type: TP
1575 #: build/C/man3/fmtmsg.3:133
1576 #, no-wrap
1577 msgid "B<MM_HALT>"
1578 msgstr ""
1579
1580 #. type: Plain text
1581 #: build/C/man3/fmtmsg.3:136
1582 msgid "This value is printed as HALT."
1583 msgstr ""
1584
1585 #. type: TP
1586 #: build/C/man3/fmtmsg.3:136
1587 #, no-wrap
1588 msgid "B<MM_ERROR>"
1589 msgstr ""
1590
1591 #. type: Plain text
1592 #: build/C/man3/fmtmsg.3:139
1593 msgid "This value is printed as ERROR."
1594 msgstr ""
1595
1596 #. type: TP
1597 #: build/C/man3/fmtmsg.3:139
1598 #, no-wrap
1599 msgid "B<MM_WARNING>"
1600 msgstr ""
1601
1602 #. type: Plain text
1603 #: build/C/man3/fmtmsg.3:142
1604 msgid "This value is printed as WARNING."
1605 msgstr ""
1606
1607 #. type: TP
1608 #: build/C/man3/fmtmsg.3:142
1609 #, no-wrap
1610 msgid "B<MM_INFO>"
1611 msgstr ""
1612
1613 #. type: Plain text
1614 #: build/C/man3/fmtmsg.3:145
1615 msgid "This value is printed as INFO."
1616 msgstr ""
1617
1618 #. type: Plain text
1619 #: build/C/man3/fmtmsg.3:152
1620 msgid ""
1621 "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the "
1622 "environment variable B<SEV_LEVEL> you can add more levels and strings to "
1623 "print."
1624 msgstr ""
1625
1626 #. type: Plain text
1627 #: build/C/man3/fmtmsg.3:154
1628 msgid "The function can return 4 values:"
1629 msgstr ""
1630
1631 #. type: TP
1632 #: build/C/man3/fmtmsg.3:154
1633 #, no-wrap
1634 msgid "B<MM_OK>"
1635 msgstr ""
1636
1637 #. type: Plain text
1638 #: build/C/man3/fmtmsg.3:157
1639 msgid "Everything went smooth."
1640 msgstr ""
1641
1642 #. type: TP
1643 #: build/C/man3/fmtmsg.3:157
1644 #, no-wrap
1645 msgid "B<MM_NOTOK>"
1646 msgstr ""
1647
1648 #. type: Plain text
1649 #: build/C/man3/fmtmsg.3:160
1650 msgid "Complete failure."
1651 msgstr ""
1652
1653 #. type: TP
1654 #: build/C/man3/fmtmsg.3:160
1655 #, no-wrap
1656 msgid "B<MM_NOMSG>"
1657 msgstr ""
1658
1659 #. type: Plain text
1660 #: build/C/man3/fmtmsg.3:164
1661 msgid "Error writing to I<stderr>."
1662 msgstr ""
1663
1664 #. type: TP
1665 #: build/C/man3/fmtmsg.3:164
1666 #, no-wrap
1667 msgid "B<MM_NOCON>"
1668 msgstr ""
1669
1670 #. type: Plain text
1671 #: build/C/man3/fmtmsg.3:167
1672 msgid "Error writing to the console."
1673 msgstr ""
1674
1675 #. type: SH
1676 #: build/C/man3/fmtmsg.3:167
1677 #, no-wrap
1678 msgid "ENVIRONMENT"
1679 msgstr ""
1680
1681 #. type: Plain text
1682 #: build/C/man3/fmtmsg.3:178
1683 msgid ""
1684 "The environment variable B<MSGVERB> (\"message verbosity\") can be used to "
1685 "suppress parts of the output to I<stderr>.  (It does not influence output to "
1686 "the console.)  When this variable is defined, is non-NULL, and is a "
1687 "colon-separated list of valid keywords, then only the parts of the message "
1688 "corresponding to these keywords is printed.  Valid keywords are \"label\", "
1689 "\"severity\", \"text\", \"action\" and \"tag\"."
1690 msgstr ""
1691
1692 #. type: Plain text
1693 #: build/C/man3/fmtmsg.3:190
1694 msgid ""
1695 "The environment variable B<SEV_LEVEL> can be used to introduce new severity "
1696 "levels.  By default, only the five severity levels described above are "
1697 "available.  Any other numeric value would make B<fmtmsg>()  print nothing.  "
1698 "If the user puts B<SEV_LEVEL> with a format like"
1699 msgstr ""
1700
1701 #. type: Plain text
1702 #: build/C/man3/fmtmsg.3:193
1703 msgid "SEV_LEVEL=[description[:description[:...]]]"
1704 msgstr ""
1705
1706 #. type: Plain text
1707 #: build/C/man3/fmtmsg.3:198
1708 msgid ""
1709 "in the environment of the process before the first call to B<fmtmsg>(), "
1710 "where each description is of the form"
1711 msgstr ""
1712
1713 #. type: Plain text
1714 #: build/C/man3/fmtmsg.3:201
1715 msgid "severity-keyword,level,printstring"
1716 msgstr ""
1717
1718 #. type: Plain text
1719 #: build/C/man3/fmtmsg.3:208
1720 msgid ""
1721 "then B<fmtmsg>()  will also accept the indicated values for the level (in "
1722 "addition to the standard levels 0-4), and use the indicated printstring when "
1723 "such a level occurs."
1724 msgstr ""
1725
1726 #. type: Plain text
1727 #: build/C/man3/fmtmsg.3:222
1728 msgid ""
1729 "The severity-keyword part is not used by B<fmtmsg>()  but it has to be "
1730 "present.  The level part is a string representation of a number.  The "
1731 "numeric value must be a number greater than 4.  This value must be used in "
1732 "the severity argument of B<fmtmsg>()  to select this class.  It is not "
1733 "possible to overwrite any of the predefined classes.  The printstring is the "
1734 "string printed when a message of this class is processed by B<fmtmsg>()."
1735 msgstr ""
1736
1737 #. type: Plain text
1738 #: build/C/man3/fmtmsg.3:225
1739 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
1740 msgstr ""
1741
1742 #. type: Plain text
1743 #: build/C/man3/fmtmsg.3:231
1744 msgid ""
1745 "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is "
1746 "not protected, so it is not thread-safe."
1747 msgstr ""
1748
1749 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
1750 #. type: Plain text
1751 #: build/C/man3/fmtmsg.3:237
1752 msgid ""
1753 "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the "
1754 "static variable, so it is thread-safe."
1755 msgstr ""
1756
1757 #. type: Plain text
1758 #: build/C/man3/fmtmsg.3:252
1759 msgid ""
1760 "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables "
1761 "B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  "
1762 "and the environment variable B<MSGVERB> are described in POSIX.1-2001."
1763 msgstr ""
1764
1765 #. type: Plain text
1766 #: build/C/man3/fmtmsg.3:256
1767 msgid ""
1768 "System V and UnixWare man pages tell us that these functions have been "
1769 "replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and "
1770 "vlfmt()\", and will be removed later."
1771 msgstr ""
1772
1773 #. type: Plain text
1774 #: build/C/man3/fmtmsg.3:261
1775 #, no-wrap
1776 msgid ""
1777 "#include E<lt>stdio.hE<gt>\n"
1778 "#include E<lt>stdlib.hE<gt>\n"
1779 "#include E<lt>fmtmsg.hE<gt>\n"
1780 msgstr ""
1781
1782 #. type: Plain text
1783 #: build/C/man3/fmtmsg.3:267
1784 #, no-wrap
1785 msgid ""
1786 "int\n"
1787 "main(void)\n"
1788 "{\n"
1789 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
1790 "    int err;\n"
1791 msgstr ""
1792
1793 #. type: Plain text
1794 #: build/C/man3/fmtmsg.3:288
1795 #, no-wrap
1796 msgid ""
1797 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
1798 "                \"unknown mount option\", \"See mount(8).\",\n"
1799 "                \"util-linux:mount:017\");\n"
1800 "    switch (err) {\n"
1801 "    case MM_OK:\n"
1802 "        break;\n"
1803 "    case MM_NOTOK:\n"
1804 "        printf(\"Nothing printed\\en\");\n"
1805 "        break;\n"
1806 "    case MM_NOMSG:\n"
1807 "        printf(\"Nothing printed to stderr\\en\");\n"
1808 "        break;\n"
1809 "    case MM_NOCON:\n"
1810 "        printf(\"No console output\\en\");\n"
1811 "        break;\n"
1812 "    default:\n"
1813 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
1814 "    }\n"
1815 "    exit(EXIT_SUCCESS);\n"
1816 "}\n"
1817 msgstr ""
1818
1819 #. type: Plain text
1820 #: build/C/man3/fmtmsg.3:291
1821 msgid "The output should be:"
1822 msgstr ""
1823
1824 #. type: Plain text
1825 #: build/C/man3/fmtmsg.3:295
1826 #, no-wrap
1827 msgid ""
1828 "    util-linux:mount: ERROR: unknown mount option\n"
1829 "    TO FIX: See mount(8).  util-linux:mount:017\n"
1830 msgstr ""
1831
1832 #. type: Plain text
1833 #: build/C/man3/fmtmsg.3:298
1834 msgid "and after"
1835 msgstr ""
1836
1837 #. type: Plain text
1838 #: build/C/man3/fmtmsg.3:301
1839 #, no-wrap
1840 msgid "    MSGVERB=text:action; export MSGVERB\n"
1841 msgstr ""
1842
1843 #. type: Plain text
1844 #: build/C/man3/fmtmsg.3:304
1845 msgid "the output becomes:"
1846 msgstr ""
1847
1848 #. type: Plain text
1849 #: build/C/man3/fmtmsg.3:308
1850 #, no-wrap
1851 msgid ""
1852 "    unknown mount option\n"
1853 "    TO FIX: See mount(8).\n"
1854 msgstr ""
1855
1856 #. type: Plain text
1857 #: build/C/man3/fmtmsg.3:312
1858 msgid "B<addseverity>(3), B<perror>(3)"
1859 msgstr ""
1860
1861 #. type: TH
1862 #: build/C/man3/fopen.3:44
1863 #, no-wrap
1864 msgid "FOPEN"
1865 msgstr ""
1866
1867 #. type: TH
1868 #: build/C/man3/fopen.3:44
1869 #, no-wrap
1870 msgid "2012-04-22"
1871 msgstr ""
1872
1873 #. type: Plain text
1874 #: build/C/man3/fopen.3:47
1875 msgid "fopen, fdopen, freopen - stream open functions"
1876 msgstr ""
1877
1878 #. type: Plain text
1879 #: build/C/man3/fopen.3:52
1880 #, no-wrap
1881 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
1882 msgstr ""
1883
1884 #. type: Plain text
1885 #: build/C/man3/fopen.3:54
1886 #, no-wrap
1887 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
1888 msgstr ""
1889
1890 #. type: Plain text
1891 #: build/C/man3/fopen.3:56
1892 #, no-wrap
1893 msgid ""
1894 "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE "
1895 "*>I<stream>B<);>\n"
1896 msgstr ""
1897
1898 #. type: Plain text
1899 #: build/C/man3/fopen.3:65
1900 msgid "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
1901 msgstr ""
1902
1903 #. type: Plain text
1904 #: build/C/man3/fopen.3:71
1905 msgid ""
1906 "The B<fopen>()  function opens the file whose name is the string pointed to "
1907 "by I<path> and associates a stream with it."
1908 msgstr ""
1909
1910 #. type: Plain text
1911 #: build/C/man3/fopen.3:76
1912 msgid ""
1913 "The argument I<mode> points to a string beginning with one of the following "
1914 "sequences (possibly followed by additional characters, as described below):"
1915 msgstr ""
1916
1917 #. type: TP
1918 #: build/C/man3/fopen.3:76
1919 #, no-wrap
1920 msgid "B<r>"
1921 msgstr ""
1922
1923 #. type: Plain text
1924 #: build/C/man3/fopen.3:80
1925 msgid ""
1926 "Open text file for reading.  The stream is positioned at the beginning of "
1927 "the file."
1928 msgstr ""
1929
1930 #. type: TP
1931 #: build/C/man3/fopen.3:80
1932 #, no-wrap
1933 msgid "B<r+>"
1934 msgstr ""
1935
1936 #. type: Plain text
1937 #: build/C/man3/fopen.3:84
1938 msgid ""
1939 "Open for reading and writing.  The stream is positioned at the beginning of "
1940 "the file."
1941 msgstr ""
1942
1943 #. type: TP
1944 #: build/C/man3/fopen.3:84
1945 #, no-wrap
1946 msgid "B<w>"
1947 msgstr ""
1948
1949 #. type: Plain text
1950 #: build/C/man3/fopen.3:88
1951 msgid ""
1952 "Truncate file to zero length or create text file for writing.  The stream is "
1953 "positioned at the beginning of the file."
1954 msgstr ""
1955
1956 #. type: TP
1957 #: build/C/man3/fopen.3:88
1958 #, no-wrap
1959 msgid "B<w+>"
1960 msgstr ""
1961
1962 #. type: Plain text
1963 #: build/C/man3/fopen.3:94
1964 msgid ""
1965 "Open for reading and writing.  The file is created if it does not exist, "
1966 "otherwise it is truncated.  The stream is positioned at the beginning of the "
1967 "file."
1968 msgstr ""
1969
1970 #. type: TP
1971 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
1972 #, no-wrap
1973 msgid "B<a>"
1974 msgstr ""
1975
1976 #. type: Plain text
1977 #: build/C/man3/fopen.3:99
1978 msgid ""
1979 "Open for appending (writing at end of file).  The file is created if it does "
1980 "not exist.  The stream is positioned at the end of the file."
1981 msgstr ""
1982
1983 #. type: TP
1984 #: build/C/man3/fopen.3:99
1985 #, no-wrap
1986 msgid "B<a+>"
1987 msgstr ""
1988
1989 #. type: Plain text
1990 #: build/C/man3/fopen.3:105
1991 msgid ""
1992 "Open for reading and appending (writing at end of file).  The file is "
1993 "created if it does not exist.  The initial file position for reading is at "
1994 "the beginning of the file, but output is always appended to the end of the "
1995 "file."
1996 msgstr ""
1997
1998 #. type: Plain text
1999 #: build/C/man3/fopen.3:118
2000 msgid ""
2001 "The I<mode> string can also include the letter \\(aqb\\(aq either as a last "
2002 "character or as a character between the characters in any of the "
2003 "two-character strings described above.  This is strictly for compatibility "
2004 "with C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX "
2005 "conforming systems, including Linux.  (Other systems may treat text files "
2006 "and binary files differently, and adding the \\(aqb\\(aq may be a good idea "
2007 "if you do I/O to a binary file and expect that your program may be ported to "
2008 "non-UNIX environments.)"
2009 msgstr ""
2010
2011 #. type: Plain text
2012 #: build/C/man3/fopen.3:121
2013 msgid "See NOTES below for details of glibc extensions for I<mode>."
2014 msgstr ""
2015
2016 #. type: Plain text
2017 #: build/C/man3/fopen.3:126
2018 msgid ""
2019 "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | "
2020 "B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's "
2021 "umask value (see B<umask>(2))."
2022 msgstr ""
2023
2024 #. type: Plain text
2025 #: build/C/man3/fopen.3:141
2026 msgid ""
2027 "Reads and writes may be intermixed on read/write streams in any order.  Note "
2028 "that ANSI C requires that a file positioning function intervene between "
2029 "output and input, unless an input operation encounters end-of-file.  (If "
2030 "this condition is not met, then a read is allowed to return the result of "
2031 "writes other than the most recent.)  Therefore it is good practice (and "
2032 "indeed sometimes necessary under Linux) to put an B<fseek>(3)  or "
2033 "B<fgetpos>(3)  operation between write and read operations on such a "
2034 "stream.  This operation may be an apparent no-op (as in I<fseek(..., 0L, "
2035 "SEEK_CUR)> called for its synchronizing side effect."
2036 msgstr ""
2037
2038 #. type: Plain text
2039 #: build/C/man3/fopen.3:146
2040 msgid ""
2041 "Opening a file in append mode (B<a> as the first character of I<mode>)  "
2042 "causes all subsequent write operations to this stream to occur at "
2043 "end-of-file, as if preceded the call:"
2044 msgstr ""
2045
2046 #. type: Plain text
2047 #: build/C/man3/fopen.3:149
2048 #, no-wrap
2049 msgid "    fseek(stream, 0, SEEK_END);\n"
2050 msgstr ""
2051
2052 #. type: Plain text
2053 #: build/C/man3/fopen.3:171
2054 msgid ""
2055 "The B<fdopen>()  function associates a stream with the existing file "
2056 "descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", "
2057 "\"r+\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of "
2058 "the file descriptor.  The file position indicator of the new stream is set "
2059 "to that belonging to I<fd>, and the error and end-of-file indicators are "
2060 "cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The "
2061 "file descriptor is not dup'ed, and will be closed when the stream created by "
2062 "B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared "
2063 "memory object is undefined."
2064 msgstr ""
2065
2066 #. type: Plain text
2067 #: build/C/man3/fopen.3:189
2068 msgid ""
2069 "The B<freopen>()  function opens the file whose name is the string pointed "
2070 "to by I<path> and associates the stream pointed to by I<stream> with it.  "
2071 "The original stream (if it exists) is closed.  The I<mode> argument is used "
2072 "just as in the B<fopen>()  function.  The primary use of the B<freopen>()  "
2073 "function is to change the file associated with a standard text stream "
2074 "(I<stderr>, I<stdin>, or I<stdout>)."
2075 msgstr ""
2076
2077 #. type: Plain text
2078 #: build/C/man3/fopen.3:201
2079 msgid ""
2080 "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return "
2081 "a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to "
2082 "indicate the error."
2083 msgstr ""
2084
2085 #. type: TP
2086 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142 build/C/man3/getline.3:126 build/C/man2/llseek.2:77 build/C/man2/lseek.2:175 build/C/man2/pipe.2:102 build/C/man2/read.2:126 build/C/man2/read.2:137 build/C/man2/readlink.2:95 build/C/man2/readlink.2:104 build/C/man2/readv.2:200 build/C/man2/rename.2:139 build/C/man2/rmdir.2:67 build/C/man3/scanf.3:565 build/C/man2/write.2:154
2087 #, no-wrap
2088 msgid "B<EINVAL>"
2089 msgstr ""
2090
2091 #. type: Plain text
2092 #: build/C/man3/fopen.3:212
2093 msgid ""
2094 "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was "
2095 "invalid."
2096 msgstr ""
2097
2098 #. type: Plain text
2099 #: build/C/man3/fopen.3:222
2100 msgid ""
2101 "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and "
2102 "set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2103 msgstr ""
2104
2105 #. type: Plain text
2106 #: build/C/man3/fopen.3:229
2107 msgid ""
2108 "The B<fopen>()  function may also fail and set I<errno> for any of the "
2109 "errors specified for the routine B<open>(2)."
2110 msgstr ""
2111
2112 #. type: Plain text
2113 #: build/C/man3/fopen.3:236
2114 msgid ""
2115 "The B<fdopen>()  function may also fail and set I<errno> for any of the "
2116 "errors specified for the routine B<fcntl>(2)."
2117 msgstr ""
2118
2119 #. type: Plain text
2120 #: build/C/man3/fopen.3:246
2121 msgid ""
2122 "The B<freopen>()  function may also fail and set I<errno> for any of the "
2123 "errors specified for the routines B<open>(2), B<fclose>(3)  and "
2124 "B<fflush>(3)."
2125 msgstr ""
2126
2127 #. type: Plain text
2128 #: build/C/man3/fopen.3:255
2129 msgid ""
2130 "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>()  "
2131 "function conforms to POSIX.1-1990."
2132 msgstr ""
2133
2134 #. type: SS
2135 #: build/C/man3/fopen.3:256
2136 #, no-wrap
2137 msgid "Glibc notes"
2138 msgstr ""
2139
2140 #. type: Plain text
2141 #: build/C/man3/fopen.3:259
2142 msgid ""
2143 "The GNU C library allows the following extensions for the string specified "
2144 "in I<mode>:"
2145 msgstr ""
2146
2147 #. type: TP
2148 #: build/C/man3/fopen.3:259
2149 #, no-wrap
2150 msgid "B<c> (since glibc 2.3.3)"
2151 msgstr ""
2152
2153 #. type: Plain text
2154 #: build/C/man3/fopen.3:266
2155 msgid ""
2156 "Do not make the open operation, or subsequent read and write operations, "
2157 "thread cancellation points.  This flag is ignored for B<fdopen>()."
2158 msgstr ""
2159
2160 #. type: TP
2161 #: build/C/man3/fopen.3:266
2162 #, no-wrap
2163 msgid "B<e> (since glibc 2.7)"
2164 msgstr ""
2165
2166 #. type: Plain text
2167 #: build/C/man3/fopen.3:276
2168 msgid ""
2169 "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more "
2170 "information.  This flag is ignored for B<fdopen>()."
2171 msgstr ""
2172
2173 #. type: TP
2174 #: build/C/man3/fopen.3:276
2175 #, no-wrap
2176 msgid "B<m> (since glibc 2.3)"
2177 msgstr ""
2178
2179 #.  As at glibc 2.4:
2180 #. type: Plain text
2181 #: build/C/man3/fopen.3:288
2182 msgid ""
2183 "Attempt to access the file using B<mmap>(2), rather than I/O system calls "
2184 "(B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only "
2185 "for a file opened for reading."
2186 msgstr ""
2187
2188 #. type: TP
2189 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2190 #, no-wrap
2191 msgid "B<x>"
2192 msgstr ""
2193
2194 #.  Since glibc 2.0?
2195 #.  FIXME C11 specifies this flag
2196 #. type: Plain text
2197 #: build/C/man3/fopen.3:305
2198 msgid ""
2199 "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the "
2200 "file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  "
2201 "This flag is ignored for B<fdopen>()."
2202 msgstr ""
2203
2204 #. type: Plain text
2205 #: build/C/man3/fopen.3:313
2206 msgid ""
2207 "In addition to the above characters, B<fopen>()  and B<freopen>()  support "
2208 "the following syntax in I<mode>:"
2209 msgstr ""
2210
2211 #. type: Plain text
2212 #: build/C/man3/fopen.3:315
2213 msgid "B< ,ccs=>I<string>"
2214 msgstr ""
2215
2216 #. type: Plain text
2217 #: build/C/man3/fopen.3:331
2218 msgid ""
2219 "The given I<string> is taken as the name of a coded character set and the "
2220 "stream is marked as wide-oriented.  Thereafter, internal conversion "
2221 "functions convert I/O to and from the character set I<string>.  If the "
2222 "B<,ccs=>I<string> syntax is not specified, then the wide-orientation of the "
2223 "stream is determined by the first file operation.  If that operation is a "
2224 "wide-character operation, the stream is marked wide-oriented, and functions "
2225 "to convert to the coded character set are loaded."
2226 msgstr ""
2227
2228 #.  FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2229 #. type: Plain text
2230 #: build/C/man3/fopen.3:348
2231 msgid ""
2232 "When parsing for individual flag characters in I<mode> (i.e., the characters "
2233 "preceding the \"ccs\" specification), the glibc implementation of B<fopen>()  "
2234 "and B<freopen>()  limits the number of characters examined in I<mode> to 7 "
2235 "(or, in glibc versions before 2.14, to 6, which was not enough to include "
2236 "possible specifications such as \"rb+cmxe\").  The current implementation of "
2237 "B<fdopen>()  parses at most 5 characters in I<mode>."
2238 msgstr ""
2239
2240 #. type: Plain text
2241 #: build/C/man3/fopen.3:354
2242 msgid "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2243 msgstr ""
2244
2245 #. type: TH
2246 #: build/C/man3/fopencookie.3:26
2247 #, no-wrap
2248 msgid "FOPENCOOKIE"
2249 msgstr ""
2250
2251 #. type: TH
2252 #: build/C/man3/fopencookie.3:26
2253 #, no-wrap
2254 msgid "2013-03-17"
2255 msgstr ""
2256
2257 #. type: TH
2258 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:31 build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:52 build/C/man2/pipe.2:36 build/C/man2/read.2:35 build/C/man2/readlink.2:43 build/C/man2/readv.2:32 build/C/man2/rename.2:32 build/C/man2/rmdir.2:30 build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man2/symlink.2:32 build/C/man7/symlink.7:36 build/C/man2/unlink.2:32 build/C/man2/write.2:39
2259 #, no-wrap
2260 msgid "Linux"
2261 msgstr ""
2262
2263 #. type: Plain text
2264 #: build/C/man3/fopencookie.3:29
2265 msgid "fopencookie - opening a custom stream"
2266 msgstr ""
2267
2268 #. type: Plain text
2269 #: build/C/man3/fopencookie.3:36
2270 #, no-wrap
2271 msgid ""
2272 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2273 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2274 msgstr ""
2275
2276 #. type: Plain text
2277 #: build/C/man3/fopencookie.3:49
2278 msgid ""
2279 "The B<fopencookie>()  function allows the programmer to create a custom "
2280 "implementation for a standard I/O stream.  This implementation can store the "
2281 "stream's data at a location of its own choosing; for example, "
2282 "B<fopencookie>()  is used to implement B<fmemopen>(3), which provides a "
2283 "stream interface to data that is stored in a buffer in memory."
2284 msgstr ""
2285
2286 #. type: Plain text
2287 #: build/C/man3/fopencookie.3:51
2288 msgid "In order to create a custom stream the programmer must:"
2289 msgstr ""
2290
2291 #. type: IP
2292 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54 build/C/man3/fopencookie.3:65 build/C/man3/scanf.3:633 build/C/man3/scanf.3:638 build/C/man3/scanf.3:644 build/C/man7/symlink.7:249 build/C/man7/symlink.7:259 build/C/man7/symlink.7:289 build/C/man7/symlink.7:349 build/C/man7/symlink.7:378 build/C/man7/symlink.7:407 build/C/man7/symlink.7:438 build/C/man7/symlink.7:451
2293 #, no-wrap
2294 msgid "*"
2295 msgstr ""
2296
2297 #. type: Plain text
2298 #: build/C/man3/fopencookie.3:54
2299 msgid ""
2300 "Implement four \"hook\" functions that are used internally by the standard "
2301 "I/O library when performing I/O on the stream."
2302 msgstr ""
2303
2304 #. type: Plain text
2305 #: build/C/man3/fopencookie.3:65
2306 msgid ""
2307 "Define a \"cookie\" data type, a structure that provides bookkeeping "
2308 "information (e.g., where to store data) used by the aforementioned hook "
2309 "functions.  The standard I/O package knows nothing about the contents of "
2310 "this cookie (thus it is typed as I<void\\ *> when passed to "
2311 "B<fopencookie>()), but automatically supplies the cookie as the first "
2312 "argument when calling the hook functions."
2313 msgstr ""
2314
2315 #. type: Plain text
2316 #: build/C/man3/fopencookie.3:70
2317 msgid ""
2318 "Call B<fopencookie>()  to open a new stream and associate the cookie and "
2319 "hook functions with that stream."
2320 msgstr ""
2321
2322 #. type: Plain text
2323 #: build/C/man3/fopencookie.3:78
2324 msgid ""
2325 "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it "
2326 "opens a new stream and returns a pointer to a I<FILE> object that is used to "
2327 "operate on that stream."
2328 msgstr ""
2329
2330 #. type: Plain text
2331 #: build/C/man3/fopencookie.3:85
2332 msgid ""
2333 "The I<cookie> argument is a pointer to the caller's cookie structure that is "
2334 "to be associated with the new stream.  This pointer is supplied as the first "
2335 "argument when the standard I/O library invokes any of the hook functions "
2336 "described below."
2337 msgstr ""
2338
2339 #. type: Plain text
2340 #: build/C/man3/fopencookie.3:101
2341 msgid ""
2342 "The I<mode> argument serves the same purpose as for B<fopen>(3).  The "
2343 "following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  "
2344 "See B<fopen>(3)  for details."
2345 msgstr ""
2346
2347 #. type: Plain text
2348 #: build/C/man3/fopencookie.3:107
2349 msgid ""
2350 "The I<io_funcs> argument is a structure that contains four fields pointing "
2351 "to the programmer-defined hook functions that are used to implement this "
2352 "stream.  The structure is defined as follows"
2353 msgstr ""
2354
2355 #. type: Plain text
2356 #: build/C/man3/fopencookie.3:116
2357 #, no-wrap
2358 msgid ""
2359 "typedef struct {\n"
2360 "    cookie_read_function_t  *read;\n"
2361 "    cookie_write_function_t *write;\n"
2362 "    cookie_seek_function_t  *seek;\n"
2363 "    cookie_close_function_t *close;\n"
2364 "} cookie_io_functions_t;\n"
2365 msgstr ""
2366
2367 #. type: Plain text
2368 #: build/C/man3/fopencookie.3:120
2369 msgid "The four fields are as follows:"
2370 msgstr ""
2371
2372 #. type: TP
2373 #: build/C/man3/fopencookie.3:120
2374 #, no-wrap
2375 msgid "I<cookie_read_function_t *read>"
2376 msgstr ""
2377
2378 #. type: Plain text
2379 #: build/C/man3/fopencookie.3:124
2380 msgid ""
2381 "This function implements read operations for the stream.  When called, it "
2382 "receives three arguments:"
2383 msgstr ""
2384
2385 #. type: Plain text
2386 #: build/C/man3/fopencookie.3:126
2387 #, no-wrap
2388 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
2389 msgstr ""
2390
2391 #. type: Plain text
2392 #: build/C/man3/fopencookie.3:141
2393 msgid ""
2394 "The I<buf> and I<size> arguments are, respectively, a buffer into which "
2395 "input data can be placed and the size of that buffer.  As its function "
2396 "result, the I<read> function should return the number of bytes copied into "
2397 "I<buf>, 0 on end of file, or -1 on error.  The I<read> function should "
2398 "update the stream offset appropriately."
2399 msgstr ""
2400
2401 #. type: Plain text
2402 #: build/C/man3/fopencookie.3:146
2403 msgid ""
2404 "If I<*read> is a NULL pointer, then reads from the custom stream always "
2405 "return end of file."
2406 msgstr ""
2407
2408 #. type: TP
2409 #: build/C/man3/fopencookie.3:146
2410 #, no-wrap
2411 msgid "I<cookie_write_function_t *write>"
2412 msgstr ""
2413
2414 #. type: Plain text
2415 #: build/C/man3/fopencookie.3:150
2416 msgid ""
2417 "This function implements write operations for the stream.  When called, it "
2418 "receives three arguments:"
2419 msgstr ""
2420
2421 #. type: Plain text
2422 #: build/C/man3/fopencookie.3:152
2423 #, no-wrap
2424 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
2425 msgstr ""
2426
2427 #. type: Plain text
2428 #: build/C/man3/fopencookie.3:168
2429 msgid ""
2430 "The I<buf> and I<size> arguments are, respectively, a buffer of data to be "
2431 "output to the stream and the size of that buffer.  As its function result, "
2432 "the I<write> function should return the number of bytes copied from I<buf>, "
2433 "or 0 on error.  (The function must not return a negative value.)  The "
2434 "I<write> function should update the stream offset appropriately."
2435 msgstr ""
2436
2437 #. type: Plain text
2438 #: build/C/man3/fopencookie.3:173
2439 msgid "If I<*write> is a NULL pointer, then output to the stream is discarded."
2440 msgstr ""
2441
2442 #. type: TP
2443 #: build/C/man3/fopencookie.3:173
2444 #, no-wrap
2445 msgid "I<cookie_seek_function_t *seek>"
2446 msgstr ""
2447
2448 #. type: Plain text
2449 #: build/C/man3/fopencookie.3:177
2450 msgid ""
2451 "This function implements seek operations on the stream.  When called, it "
2452 "receives three arguments:"
2453 msgstr ""
2454
2455 #. type: Plain text
2456 #: build/C/man3/fopencookie.3:179
2457 #, no-wrap
2458 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
2459 msgstr ""
2460
2461 #. type: Plain text
2462 #: build/C/man3/fopencookie.3:185
2463 msgid ""
2464 "The I<*offset> argument specifies the new file offset depending on which of "
2465 "the following three values is supplied in I<whence>:"
2466 msgstr ""
2467
2468 #. type: TP
2469 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
2470 #, no-wrap
2471 msgid "B<SEEK_SET>"
2472 msgstr ""
2473
2474 #. type: Plain text
2475 #: build/C/man3/fopencookie.3:191
2476 msgid ""
2477 "The stream offset should be set I<*offset> bytes from the start of the "
2478 "stream."
2479 msgstr ""
2480
2481 #. type: TP
2482 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
2483 #, no-wrap
2484 msgid "B<SEEK_CUR>"
2485 msgstr ""
2486
2487 #. type: Plain text
2488 #: build/C/man3/fopencookie.3:195
2489 msgid "I<*offset> should be added to the current stream offset."
2490 msgstr ""
2491
2492 #. type: TP
2493 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
2494 #, no-wrap
2495 msgid "B<SEEK_END>"
2496 msgstr ""
2497
2498 #. type: Plain text
2499 #: build/C/man3/fopencookie.3:199
2500 msgid "The stream offset should be set to the size of the stream plus I<*offset>."
2501 msgstr ""
2502
2503 #. type: Plain text
2504 #: build/C/man3/fopencookie.3:206
2505 msgid ""
2506 "Before returning, the I<seek> function should update I<*offset> to indicate "
2507 "the new stream offset."
2508 msgstr ""
2509
2510 #. type: Plain text
2511 #: build/C/man3/fopencookie.3:210
2512 msgid ""
2513 "As its function result, the I<seek> function should return 0 on success, and "
2514 "-1 on error."
2515 msgstr ""
2516
2517 #. type: Plain text
2518 #: build/C/man3/fopencookie.3:215
2519 msgid ""
2520 "If I<*seek> is a NULL pointer, then it is not possible to perform seek "
2521 "operations on the stream."
2522 msgstr ""
2523
2524 #. type: TP
2525 #: build/C/man3/fopencookie.3:215
2526 #, no-wrap
2527 msgid "I<cookie_close_function_t *close>"
2528 msgstr ""
2529
2530 #. type: Plain text
2531 #: build/C/man3/fopencookie.3:221
2532 msgid ""
2533 "This function closes the stream.  The hook function can do things such as "
2534 "freeing buffers allocated for the stream.  When called, it receives one "
2535 "argument:"
2536 msgstr ""
2537
2538 #. type: Plain text
2539 #: build/C/man3/fopencookie.3:223
2540 #, no-wrap
2541 msgid "    int close(void *cookie);\n"
2542 msgstr ""
2543
2544 #. type: Plain text
2545 #: build/C/man3/fopencookie.3:228
2546 msgid ""
2547 "The I<cookie> argument is the cookie that the programmer supplied when "
2548 "calling B<fopencookie>()."
2549 msgstr ""
2550
2551 #. type: Plain text
2552 #: build/C/man3/fopencookie.3:234
2553 msgid ""
2554 "As its function result, the I<close> function should return 0 on success, "
2555 "and B<EOF> on error."
2556 msgstr ""
2557
2558 #. type: Plain text
2559 #: build/C/man3/fopencookie.3:238
2560 msgid ""
2561 "If I<*close> is NULL, then no special action is performed when the stream is "
2562 "closed."
2563 msgstr ""
2564
2565 #.  .SH ERRORS
2566 #.  It's not clear if errno ever gets set...
2567 #. type: Plain text
2568 #: build/C/man3/fopencookie.3:245
2569 msgid ""
2570 "On success B<fopencookie>()  returns a pointer to the new stream.  On error, "
2571 "NULL is returned."
2572 msgstr ""
2573
2574 #. type: Plain text
2575 #: build/C/man3/fopencookie.3:247
2576 msgid "This function is a nonstandard GNU extension."
2577 msgstr ""
2578
2579 #. type: Plain text
2580 #: build/C/man3/fopencookie.3:256
2581 msgid ""
2582 "The program below implements a custom stream whose functionality is similar "
2583 "(but not identical) to that available via B<fmemopen>(3).  It implements a "
2584 "stream whose data is stored in a memory buffer.  The program writes its "
2585 "command-line arguments to the stream, and then seeks through the stream "
2586 "reading two out of every five characters and writing them to standard "
2587 "output.  The following shell session demonstrates the use of the program:"
2588 msgstr ""
2589
2590 #. type: Plain text
2591 #: build/C/man3/fopencookie.3:264
2592 #, no-wrap
2593 msgid ""
2594 "$B< ./a.out \\(aqhello world\\(aq>\n"
2595 "/he/\n"
2596 "/ w/\n"
2597 "/d/\n"
2598 "Reached end of file\n"
2599 msgstr ""
2600
2601 #. type: Plain text
2602 #: build/C/man3/fopencookie.3:271
2603 msgid ""
2604 "Note that a more general version of the program below could be improved to "
2605 "more robustly handle various error situations (e.g., opening a stream with a "
2606 "cookie that already has an open stream; closing a stream that has already "
2607 "been closed)."
2608 msgstr ""
2609
2610 #. type: Plain text
2611 #: build/C/man3/fopencookie.3:280
2612 #, no-wrap
2613 msgid ""
2614 "#define _GNU_SOURCE\n"
2615 "#include E<lt>sys/types.hE<gt>\n"
2616 "#include E<lt>stdio.hE<gt>\n"
2617 "#include E<lt>stdlib.hE<gt>\n"
2618 "#include E<lt>unistd.hE<gt>\n"
2619 "#include E<lt>string.hE<gt>\n"
2620 msgstr ""
2621
2622 #. type: Plain text
2623 #: build/C/man3/fopencookie.3:282
2624 #, no-wrap
2625 msgid "#define INIT_BUF_SIZE 4\n"
2626 msgstr ""
2627
2628 #. type: Plain text
2629 #: build/C/man3/fopencookie.3:289
2630 #, no-wrap
2631 msgid ""
2632 "struct memfile_cookie {\n"
2633 "    char   *buf;        /* Dynamically sized buffer for data */\n"
2634 "    size_t  allocated;  /* Size of buf */\n"
2635 "    size_t  endpos;     /* Number of characters in buf */\n"
2636 "    off_t   offset;     /* Current file offset in buf */\n"
2637 "};\n"
2638 msgstr ""
2639
2640 #. type: Plain text
2641 #: build/C/man3/fopencookie.3:295
2642 #, no-wrap
2643 msgid ""
2644 "ssize_t\n"
2645 "memfile_write(void *c, const char *buf, size_t size)\n"
2646 "{\n"
2647 "    char *new_buff;\n"
2648 "    struct memfile_cookie *cookie = c;\n"
2649 msgstr ""
2650
2651 #. type: Plain text
2652 #: build/C/man3/fopencookie.3:297
2653 #, no-wrap
2654 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
2655 msgstr ""
2656
2657 #. type: Plain text
2658 #: build/C/man3/fopencookie.3:307
2659 #, no-wrap
2660 msgid ""
2661 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
2662 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
2663 "        if (new_buff == NULL) {\n"
2664 "            return -1;\n"
2665 "        } else {\n"
2666 "            cookie-E<gt>allocated *= 2;\n"
2667 "            cookie-E<gt>buf = new_buff;\n"
2668 "        }\n"
2669 "    }\n"
2670 msgstr ""
2671
2672 #. type: Plain text
2673 #: build/C/man3/fopencookie.3:309
2674 #, no-wrap
2675 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
2676 msgstr ""
2677
2678 #. type: Plain text
2679 #: build/C/man3/fopencookie.3:313
2680 #, no-wrap
2681 msgid ""
2682 "    cookie-E<gt>offset += size;\n"
2683 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
2684 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
2685 msgstr ""
2686
2687 #. type: Plain text
2688 #: build/C/man3/fopencookie.3:316
2689 #, no-wrap
2690 msgid ""
2691 "    return size;\n"
2692 "}\n"
2693 msgstr ""
2694
2695 #. type: Plain text
2696 #: build/C/man3/fopencookie.3:322
2697 #, no-wrap
2698 msgid ""
2699 "ssize_t\n"
2700 "memfile_read(void *c, char *buf, size_t size)\n"
2701 "{\n"
2702 "    ssize_t xbytes;\n"
2703 "    struct memfile_cookie *cookie = c;\n"
2704 msgstr ""
2705
2706 #. type: Plain text
2707 #: build/C/man3/fopencookie.3:324
2708 #, no-wrap
2709 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
2710 msgstr ""
2711
2712 #. type: Plain text
2713 #: build/C/man3/fopencookie.3:330
2714 #, no-wrap
2715 msgid ""
2716 "    xbytes = size;\n"
2717 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
2718 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
2719 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
2720 "       xbytes = 0;\n"
2721 msgstr ""
2722
2723 #. type: Plain text
2724 #: build/C/man3/fopencookie.3:332
2725 #, no-wrap
2726 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
2727 msgstr ""
2728
2729 #. type: Plain text
2730 #: build/C/man3/fopencookie.3:336
2731 #, no-wrap
2732 msgid ""
2733 "    cookie-E<gt>offset += xbytes;\n"
2734 "    return xbytes;\n"
2735 "}\n"
2736 msgstr ""
2737
2738 #. type: Plain text
2739 #: build/C/man3/fopencookie.3:342
2740 #, no-wrap
2741 msgid ""
2742 "int\n"
2743 "memfile_seek(void *c, off64_t *offset, int whence)\n"
2744 "{\n"
2745 "    off64_t new_offset;\n"
2746 "    struct memfile_cookie *cookie = c;\n"
2747 msgstr ""
2748
2749 #. type: Plain text
2750 #: build/C/man3/fopencookie.3:351
2751 #, no-wrap
2752 msgid ""
2753 "    if (whence == SEEK_SET)\n"
2754 "        new_offset = *offset;\n"
2755 "    else if (whence == SEEK_END)\n"
2756 "        new_offset = cookie-E<gt>endpos + *offset;\n"
2757 "    else if (whence == SEEK_CUR)\n"
2758 "        new_offset = cookie-E<gt>offset + *offset;\n"
2759 "    else\n"
2760 "        return -1;\n"
2761 msgstr ""
2762
2763 #. type: Plain text
2764 #: build/C/man3/fopencookie.3:354
2765 #, no-wrap
2766 msgid ""
2767 "    if (new_offset E<lt> 0)\n"
2768 "        return -1;\n"
2769 msgstr ""
2770
2771 #. type: Plain text
2772 #: build/C/man3/fopencookie.3:359
2773 #, no-wrap
2774 msgid ""
2775 "    cookie-E<gt>offset = new_offset;\n"
2776 "    *offset = new_offset;\n"
2777 "    return 0;\n"
2778 "}\n"
2779 msgstr ""
2780
2781 #. type: Plain text
2782 #: build/C/man3/fopencookie.3:364
2783 #, no-wrap
2784 msgid ""
2785 "int\n"
2786 "memfile_close(void *c)\n"
2787 "{\n"
2788 "    struct memfile_cookie *cookie = c;\n"
2789 msgstr ""
2790
2791 #. type: Plain text
2792 #: build/C/man3/fopencookie.3:368
2793 #, no-wrap
2794 msgid ""
2795 "    free(cookie-E<gt>buf);\n"
2796 "    cookie-E<gt>allocated = 0;\n"
2797 "    cookie-E<gt>buf = NULL;\n"
2798 msgstr ""
2799
2800 #. type: Plain text
2801 #: build/C/man3/fopencookie.3:371
2802 #, no-wrap
2803 msgid ""
2804 "    return 0;\n"
2805 "}\n"
2806 msgstr ""
2807
2808 #. type: Plain text
2809 #: build/C/man3/fopencookie.3:387
2810 #, no-wrap
2811 msgid ""
2812 "int\n"
2813 "main(int argc, char *argv[])\n"
2814 "{\n"
2815 "    cookie_io_functions_t  memfile_func = {\n"
2816 "        .read  = memfile_read,\n"
2817 "        .write = memfile_write,\n"
2818 "        .seek  = memfile_seek,\n"
2819 "        .close = memfile_close\n"
2820 "    };\n"
2821 "    FILE *fp;\n"
2822 "    struct memfile_cookie mycookie;\n"
2823 "    ssize_t nread;\n"
2824 "    long p;\n"
2825 "    int j;\n"
2826 "    char buf[1000];\n"
2827 msgstr ""
2828
2829 #. type: Plain text
2830 #: build/C/man3/fopencookie.3:389
2831 #, no-wrap
2832 msgid "    /* Set up the cookie before calling fopencookie() */\n"
2833 msgstr ""
2834
2835 #. type: Plain text
2836 #: build/C/man3/fopencookie.3:395
2837 #, no-wrap
2838 msgid ""
2839 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
2840 "    if (mycookie.buf == NULL) {\n"
2841 "        perror(\"malloc\");\n"
2842 "        exit(EXIT_FAILURE);\n"
2843 "    }\n"
2844 msgstr ""
2845
2846 #. type: Plain text
2847 #: build/C/man3/fopencookie.3:399
2848 #, no-wrap
2849 msgid ""
2850 "    mycookie.allocated = INIT_BUF_SIZE;\n"
2851 "    mycookie.offset = 0;\n"
2852 "    mycookie.endpos = 0;\n"
2853 msgstr ""
2854
2855 #. type: Plain text
2856 #: build/C/man3/fopencookie.3:405
2857 #, no-wrap
2858 msgid ""
2859 "    fp = fopencookie(&mycookie,\"w+\", memfile_func);\n"
2860 "    if (fp == NULL) {\n"
2861 "        perror(\"fopencookie\");\n"
2862 "        exit(EXIT_FAILURE);\n"
2863 "    }\n"
2864 msgstr ""
2865
2866 #. type: Plain text
2867 #: build/C/man3/fopencookie.3:407
2868 #, no-wrap
2869 msgid "    /* Write command-line arguments to our file */\n"
2870 msgstr ""
2871
2872 #. type: Plain text
2873 #: build/C/man3/fopencookie.3:413
2874 #, no-wrap
2875 msgid ""
2876 "    for (j = 1; j E<lt> argc; j++)\n"
2877 "        if (fputs(argv[j], fp) == EOF) {\n"
2878 "            perror(\"fputs\");\n"
2879 "            exit(EXIT_FAILURE);\n"
2880 "        }\n"
2881 msgstr ""
2882
2883 #. type: Plain text
2884 #: build/C/man3/fopencookie.3:415
2885 #, no-wrap
2886 msgid "    /* Read two bytes out of every five, until EOF */\n"
2887 msgstr ""
2888
2889 #. type: Plain text
2890 #: build/C/man3/fopencookie.3:430
2891 #, no-wrap
2892 msgid ""
2893 "    for (p = 0; ; p += 5) {\n"
2894 "        if (fseek(fp, p, SEEK_SET) == -1) {\n"
2895 "            perror(\"fseek\");\n"
2896 "            exit(EXIT_FAILURE);\n"
2897 "        }\n"
2898 "        nread = fread(buf, 1, 2, fp);\n"
2899 "        if (nread == -1) {\n"
2900 "            perror(\"fread\");\n"
2901 "            exit(EXIT_FAILURE);\n"
2902 "        }\n"
2903 "        if (nread == 0) {\n"
2904 "            printf(\"Reached end of file\\en\");\n"
2905 "            break;\n"
2906 "        }\n"
2907 msgstr ""
2908
2909 #. type: Plain text
2910 #: build/C/man3/fopencookie.3:433
2911 #, no-wrap
2912 msgid ""
2913 "        printf(\"/%.*s/\\en\", nread, buf);\n"
2914 "    }\n"
2915 msgstr ""
2916
2917 #. type: Plain text
2918 #: build/C/man3/fopencookie.3:436 build/C/man2/readlink.2:213
2919 #, no-wrap
2920 msgid ""
2921 "    exit(EXIT_SUCCESS);\n"
2922 "}\n"
2923 msgstr ""
2924
2925 #. type: Plain text
2926 #: build/C/man3/fopencookie.3:442
2927 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
2928 msgstr ""
2929
2930 #. type: TH
2931 #: build/C/man3/fpurge.3:25
2932 #, no-wrap
2933 msgid "FPURGE"
2934 msgstr ""
2935
2936 #. type: TH
2937 #: build/C/man3/fpurge.3:25
2938 #, no-wrap
2939 msgid "2001-12-15"
2940 msgstr ""
2941
2942 #. type: Plain text
2943 #: build/C/man3/fpurge.3:28
2944 msgid "fpurge, __fpurge - purge a stream"
2945 msgstr ""
2946
2947 #. type: Plain text
2948 #: build/C/man3/fpurge.3:32
2949 #, no-wrap
2950 msgid ""
2951 "/* unsupported */\n"
2952 "B<#include E<lt>stdio.hE<gt>>\n"
2953 msgstr ""
2954
2955 #. type: Plain text
2956 #: build/C/man3/fpurge.3:34
2957 #, no-wrap
2958 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
2959 msgstr ""
2960
2961 #. type: Plain text
2962 #: build/C/man3/fpurge.3:37
2963 #, no-wrap
2964 msgid ""
2965 "/* supported */\n"
2966 "B<#include E<lt>stdio.hE<gt>>\n"
2967 msgstr ""
2968
2969 #. type: Plain text
2970 #: build/C/man3/fpurge.3:39
2971 #, no-wrap
2972 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
2973 msgstr ""
2974
2975 #. type: Plain text
2976 #: build/C/man3/fpurge.3:41
2977 #, no-wrap
2978 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
2979 msgstr ""
2980
2981 #. type: Plain text
2982 #: build/C/man3/fpurge.3:54
2983 msgid ""
2984 "The function B<fpurge>()  clears the buffers of the given stream.  For "
2985 "output streams this discards any unwritten output.  For input streams this "
2986 "discards any input read from the underlying object but not yet obtained via "
2987 "B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also "
2988 "B<fflush>(3)."
2989 msgstr ""
2990
2991 #. type: Plain text
2992 #: build/C/man3/fpurge.3:58
2993 msgid ""
2994 "The function B<__fpurge>()  does precisely the same, but without returning a "
2995 "value."
2996 msgstr ""
2997
2998 #. type: Plain text
2999 #: build/C/man3/fpurge.3:65
3000 msgid ""
3001 "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 "
3002 "and sets I<errno> appropriately."
3003 msgstr ""
3004
3005 #. type: Plain text
3006 #: build/C/man3/fpurge.3:70
3007 msgid "I<stream> is not an open stream."
3008 msgstr ""
3009
3010 #. type: Plain text
3011 #: build/C/man3/fpurge.3:78
3012 msgid ""
3013 "These functions are nonstandard and not portable.  The function B<fpurge>()  "
3014 "was introduced in 4.4BSD and is not available under Linux.  The function "
3015 "B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and "
3016 "later."
3017 msgstr ""
3018
3019 #. type: Plain text
3020 #: build/C/man3/fpurge.3:80
3021 msgid "Usually it is a mistake to want to discard input buffers."
3022 msgstr ""
3023
3024 #.  .BR fclean (3),
3025 #. type: Plain text
3026 #: build/C/man3/fpurge.3:85
3027 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3028 msgstr ""
3029
3030 #. type: TH
3031 #: build/C/man3/fputwc.3:16
3032 #, no-wrap
3033 msgid "FPUTWC"
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man3/fputwc.3:19
3038 msgid "fputwc, putwc - write a wide character to a FILE stream"
3039 msgstr ""
3040
3041 #. type: Plain text
3042 #: build/C/man3/fputwc.3:27
3043 #, no-wrap
3044 msgid ""
3045 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3046 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3047 msgstr ""
3048
3049 #. type: Plain text
3050 #: build/C/man3/fputwc.3:43
3051 msgid ""
3052 "The B<fputwc>()  function is the wide-character equivalent of the "
3053 "B<fputc>(3)  function.  It writes the wide character I<wc> to I<stream>.  If "
3054 "I<ferror(stream)> becomes true, it returns B<WEOF>.  If a wide-character "
3055 "conversion error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  "
3056 "Otherwise it returns I<wc>."
3057 msgstr ""
3058
3059 #. type: Plain text
3060 #: build/C/man3/fputwc.3:51
3061 msgid ""
3062 "The B<putwc>()  function or macro functions identically to B<fputwc>().  It "
3063 "may be implemented as a macro, and may evaluate its argument more than "
3064 "once.  There is no reason ever to use it."
3065 msgstr ""
3066
3067 #. type: Plain text
3068 #: build/C/man3/fputwc.3:63
3069 msgid ""
3070 "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to "
3071 "indicate an error.  In the event of an error, I<errno> is set to indicate "
3072 "the cause."
3073 msgstr ""
3074
3075 #. type: Plain text
3076 #: build/C/man3/fputwc.3:68
3077 msgid "Conversion of I<wc> to the stream's encoding fails."
3078 msgstr ""
3079
3080 #. type: Plain text
3081 #: build/C/man3/fputwc.3:77
3082 msgid ""
3083 "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the "
3084 "current locale."
3085 msgstr ""
3086
3087 #. type: Plain text
3088 #: build/C/man3/fputwc.3:85
3089 msgid ""
3090 "In the absence of additional information passed to the B<fopen>(3)  call, it "
3091 "is reasonable to expect that B<fputwc>()  will actually write the multibyte "
3092 "sequence corresponding to the wide character I<wc>."
3093 msgstr ""
3094
3095 #. type: Plain text
3096 #: build/C/man3/fputwc.3:89
3097 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3098 msgstr ""
3099
3100 #. type: TH
3101 #: build/C/man3/fread.3:45
3102 #, no-wrap
3103 msgid "FREAD"
3104 msgstr ""
3105
3106 #. type: TH
3107 #: build/C/man3/fread.3:45
3108 #, no-wrap
3109 msgid "2012-03-30"
3110 msgstr ""
3111
3112 #. type: Plain text
3113 #: build/C/man3/fread.3:48
3114 msgid "fread, fwrite - binary stream input/output"
3115 msgstr ""
3116
3117 #. type: Plain text
3118 #: build/C/man3/fread.3:54
3119 #, no-wrap
3120 msgid ""
3121 "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE "
3122 "*>I<stream>B<);>\n"
3123 msgstr ""
3124
3125 #. type: Plain text
3126 #: build/C/man3/fread.3:57
3127 #, no-wrap
3128 msgid ""
3129 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t "
3130 ">I<nmemb>B<,>\n"
3131 "B<              FILE *>I<stream>B<);>\n"
3132 msgstr ""
3133
3134 #. type: Plain text
3135 #: build/C/man3/fread.3:69
3136 msgid ""
3137 "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes "
3138 "long, from the stream pointed to by I<stream>, storing them at the location "
3139 "given by I<ptr>."
3140 msgstr ""
3141
3142 #. type: Plain text
3143 #: build/C/man3/fread.3:80
3144 msgid ""
3145 "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> "
3146 "bytes long, to the stream pointed to by I<stream>, obtaining them from the "
3147 "location given by I<ptr>."
3148 msgstr ""
3149
3150 #. type: Plain text
3151 #: build/C/man3/fread.3:96
3152 msgid ""
3153 "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read "
3154 "or written.  This number equals the number of bytes transferred only when "
3155 "I<size> is 1.  If an error occurs, or the end of the file is reached, the "
3156 "return value is a short item count (or zero)."
3157 msgstr ""
3158
3159 #. type: Plain text
3160 #: build/C/man3/fread.3:103
3161 msgid ""
3162 "B<fread>()  does not distinguish between end-of-file and error, and callers "
3163 "must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
3164 msgstr ""
3165
3166 #. type: Plain text
3167 #: build/C/man3/fread.3:105
3168 msgid "C89, POSIX.1-2001."
3169 msgstr ""
3170
3171 #. type: Plain text
3172 #: build/C/man3/fread.3:111
3173 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
3174 msgstr ""
3175
3176 #. type: TH
3177 #: build/C/man3/fseek.3:42
3178 #, no-wrap
3179 msgid "FSEEK"
3180 msgstr ""
3181
3182 #. type: TH
3183 #: build/C/man3/fseek.3:42
3184 #, no-wrap
3185 msgid "1993-11-29"
3186 msgstr ""
3187
3188 #. type: Plain text
3189 #: build/C/man3/fseek.3:45
3190 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
3191 msgstr ""
3192
3193 #. type: Plain text
3194 #: build/C/man3/fseek.3:49
3195 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
3196 msgstr ""
3197
3198 #. type: Plain text
3199 #: build/C/man3/fseek.3:51
3200 msgid "B<long ftell(FILE *>I<stream>B<);>"
3201 msgstr ""
3202
3203 #. type: Plain text
3204 #: build/C/man3/fseek.3:53
3205 msgid "B<void rewind(FILE *>I<stream>B<);>"
3206 msgstr ""
3207
3208 #. type: Plain text
3209 #: build/C/man3/fseek.3:55
3210 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3211 msgstr ""
3212
3213 #. type: Plain text
3214 #: build/C/man3/fseek.3:57
3215 msgid "B<int fsetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3216 msgstr ""
3217
3218 #. type: Plain text
3219 #: build/C/man3/fseek.3:81
3220 msgid ""
3221 "The B<fseek>()  function sets the file position indicator for the stream "
3222 "pointed to by I<stream>.  The new position, measured in bytes, is obtained "
3223 "by adding I<offset> bytes to the position specified by I<whence>.  If "
3224 "I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is "
3225 "relative to the start of the file, the current position indicator, or "
3226 "end-of-file, respectively.  A successful call to the B<fseek>()  function "
3227 "clears the end-of-file indicator for the stream and undoes any effects of "
3228 "the B<ungetc>(3)  function on the same stream."
3229 msgstr ""
3230
3231 #. type: Plain text
3232 #: build/C/man3/fseek.3:87
3233 msgid ""
3234 "The B<ftell>()  function obtains the current value of the file position "
3235 "indicator for the stream pointed to by I<stream>."
3236 msgstr ""
3237
3238 #. type: Plain text
3239 #: build/C/man3/fseek.3:94
3240 msgid ""
3241 "The B<rewind>()  function sets the file position indicator for the stream "
3242 "pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
3243 msgstr ""
3244
3245 #. type: Plain text
3246 #: build/C/man3/fseek.3:97
3247 msgid "(void) fseek(stream, 0L, SEEK_SET)"
3248 msgstr ""
3249
3250 #. type: Plain text
3251 #: build/C/man3/fseek.3:101
3252 msgid ""
3253 "except that the error indicator for the stream is also cleared (see "
3254 "B<clearerr>(3))."
3255 msgstr ""
3256
3257 #. type: Plain text
3258 #: build/C/man3/fseek.3:121
3259 msgid ""
3260 "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces "
3261 "equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to "
3262 "B<SEEK_SET>), setting and storing the current value of the file offset into "
3263 "or from the object referenced by I<pos>.  On some non-UNIX systems, an "
3264 "I<fpos_t> object may be a complex object and these routines may be the only "
3265 "way to portably reposition a text stream."
3266 msgstr ""
3267
3268 #. type: Plain text
3269 #: build/C/man3/fseek.3:136
3270 msgid ""
3271 "The B<rewind>()  function returns no value.  Upon successful completion, "
3272 "B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns "
3273 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
3274 "indicate the error."
3275 msgstr ""
3276
3277 #. type: Plain text
3278 #: build/C/man3/fseek.3:142
3279 msgid "The I<stream> specified is not a seekable stream."
3280 msgstr ""
3281
3282 #. type: Plain text
3283 #: build/C/man3/fseek.3:153
3284 msgid ""
3285 "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or "
3286 "B<SEEK_CUR>."
3287 msgstr ""
3288
3289 #. type: Plain text
3290 #: build/C/man3/fseek.3:168
3291 msgid ""
3292 "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may "
3293 "also fail and set I<errno> for any of the errors specified for the routines "
3294 "B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
3295 msgstr ""
3296
3297 #. type: Plain text
3298 #: build/C/man3/fseek.3:173
3299 msgid "B<lseek>(2), B<fseeko>(3)"
3300 msgstr ""
3301
3302 #. type: TH
3303 #: build/C/man3/fseeko.3:25
3304 #, no-wrap
3305 msgid "FSEEKO"
3306 msgstr ""
3307
3308 #. type: TH
3309 #: build/C/man3/fseeko.3:25
3310 #, no-wrap
3311 msgid "2001-11-05"
3312 msgstr ""
3313
3314 #. type: Plain text
3315 #: build/C/man3/fseeko.3:28
3316 msgid "fseeko, ftello - seek to or report file position"
3317 msgstr ""
3318
3319 #. type: Plain text
3320 #: build/C/man3/fseeko.3:33
3321 #, no-wrap
3322 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
3323 msgstr ""
3324
3325 #. type: Plain text
3326 #: build/C/man3/fseeko.3:36
3327 #, no-wrap
3328 msgid ""
3329 "B<off_t ftello(FILE *>I<stream>B<);>\n"
3330 "\n"
3331 msgstr ""
3332
3333 #. type: Plain text
3334 #: build/C/man3/fseeko.3:58
3335 msgid ""
3336 "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  "
3337 "and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> "
3338 "argument of B<fseeko>()  and the return value of B<ftello>()  is of type "
3339 "I<off_t> instead of I<long>."
3340 msgstr ""
3341
3342 #. type: Plain text
3343 #: build/C/man3/fseeko.3:65
3344 msgid ""
3345 "On many architectures both I<off_t> and I<long> are 32-bit types, but "
3346 "compilation with"
3347 msgstr ""
3348
3349 #. type: Plain text
3350 #: build/C/man3/fseeko.3:69 build/C/man3/lseek64.3:81
3351 #, no-wrap
3352 msgid "#define _FILE_OFFSET_BITS 64\n"
3353 msgstr ""
3354
3355 #. type: Plain text
3356 #: build/C/man3/fseeko.3:75
3357 msgid "will turn I<off_t> into a 64-bit type."
3358 msgstr ""
3359
3360 #. type: Plain text
3361 #: build/C/man3/fseeko.3:84
3362 msgid ""
3363 "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns "
3364 "the current offset.  Otherwise, -1 is returned and I<errno> is set to "
3365 "indicate the error."
3366 msgstr ""
3367
3368 #. type: Plain text
3369 #: build/C/man3/fseeko.3:87
3370 msgid "See the ERRORS in B<fseek>(3)."
3371 msgstr ""
3372
3373 #. type: Plain text
3374 #: build/C/man3/fseeko.3:89
3375 msgid "SUSv2, POSIX.1-2001."
3376 msgstr ""
3377
3378 #. type: Plain text
3379 #: build/C/man3/fseeko.3:93
3380 msgid ""
3381 "These functions are found on System V-like systems.  They are not present in "
3382 "libc4, libc5, glibc 2.0 but are available since glibc 2.1."
3383 msgstr ""
3384
3385 #. type: Plain text
3386 #: build/C/man3/fseeko.3:95
3387 msgid "B<fseek>(3)"
3388 msgstr ""
3389
3390 #. type: TH
3391 #: build/C/man3/getline.3:26
3392 #, no-wrap
3393 msgid "GETLINE"
3394 msgstr ""
3395
3396 #. type: Plain text
3397 #: build/C/man3/getline.3:29
3398 msgid "getline, getdelim - delimited string input"
3399 msgstr ""
3400
3401 #. type: Plain text
3402 #: build/C/man3/getline.3:34
3403 #, no-wrap
3404 msgid ""
3405 "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE "
3406 "*>I<stream>B<);>\n"
3407 msgstr ""
3408
3409 #. type: Plain text
3410 #: build/C/man3/getline.3:37
3411 #, no-wrap
3412 msgid ""
3413 "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, "
3414 "FILE *>I<stream>B<);>\n"
3415 msgstr ""
3416
3417 #. type: Plain text
3418 #: build/C/man3/getline.3:47
3419 msgid "B<getline>(), B<getdelim>():"
3420 msgstr ""
3421
3422 #. type: Plain text
3423 #: build/C/man3/getline.3:52
3424 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
3425 msgstr ""
3426
3427 #. type: Plain text
3428 #: build/C/man3/getline.3:65
3429 msgid ""
3430 "B<getline>()  reads an entire line from I<stream>, storing the address of "
3431 "the buffer containing the text into I<*lineptr>.  The buffer is "
3432 "null-terminated and includes the newline character, if one was found."
3433 msgstr ""
3434
3435 #. type: Plain text
3436 #: build/C/man3/getline.3:75
3437 msgid ""
3438 "If I<*lineptr> is NULL, then B<getline>()  will allocate a buffer for "
3439 "storing the line, which should be freed by the user program.  (In this case, "
3440 "the value in I<*n> is ignored.)"
3441 msgstr ""
3442
3443 #. type: Plain text
3444 #: build/C/man3/getline.3:93
3445 msgid ""
3446 "Alternatively, before calling B<getline>(), I<*lineptr> can contain a "
3447 "pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the "
3448 "buffer is not large enough to hold the line, B<getline>()  resizes it with "
3449 "B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
3450 msgstr ""
3451
3452 #. type: Plain text
3453 #: build/C/man3/getline.3:99
3454 msgid ""
3455 "In either case, on a successful call, I<*lineptr> and I<*n> will be updated "
3456 "to reflect the buffer address and allocated size respectively."
3457 msgstr ""
3458
3459 #. type: Plain text
3460 #: build/C/man3/getline.3:110
3461 msgid ""
3462 "B<getdelim>()  works like B<getline>(), except that a line delimiter other "
3463 "than newline can be specified as the I<delimiter> argument.  As with "
3464 "B<getline>(), a delimiter character is not added if one was not present in "
3465 "the input before end of file was reached."
3466 msgstr ""
3467
3468 #. type: Plain text
3469 #: build/C/man3/getline.3:119
3470 msgid ""
3471 "On success, B<getline>()  and B<getdelim>()  return the number of characters "
3472 "read, including the delimiter character, but not including the terminating "
3473 "null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null "
3474 "bytes in the line read."
3475 msgstr ""
3476
3477 #. type: Plain text
3478 #: build/C/man3/getline.3:125
3479 msgid ""
3480 "Both functions return -1 on failure to read a line (including end-of-file "
3481 "condition).  In the event of an error, I<errno> is set to indicate the "
3482 "cause."
3483 msgstr ""
3484
3485 #. type: Plain text
3486 #: build/C/man3/getline.3:135
3487 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
3488 msgstr ""
3489
3490 #. type: Plain text
3491 #: build/C/man3/getline.3:137
3492 msgid "These functions are available since libc 4.6.27."
3493 msgstr ""
3494
3495 #. type: Plain text
3496 #: build/C/man3/getline.3:144
3497 msgid ""
3498 "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They "
3499 "were standardized in POSIX.1-2008."
3500 msgstr ""
3501
3502 #. type: Plain text
3503 #: build/C/man3/getline.3:149
3504 #, no-wrap
3505 msgid ""
3506 "#define _GNU_SOURCE\n"
3507 "#include E<lt>stdio.hE<gt>\n"
3508 "#include E<lt>stdlib.hE<gt>\n"
3509 msgstr ""
3510
3511 #. type: Plain text
3512 #: build/C/man3/getline.3:157
3513 #, no-wrap
3514 msgid ""
3515 "int\n"
3516 "main(void)\n"
3517 "{\n"
3518 "    FILE *fp;\n"
3519 "    char *line = NULL;\n"
3520 "    size_t len = 0;\n"
3521 "    ssize_t read;\n"
3522 msgstr ""
3523
3524 #. type: Plain text
3525 #: build/C/man3/getline.3:161
3526 #, no-wrap
3527 msgid ""
3528 "    fp = fopen(\"/etc/motd\", \"r\");\n"
3529 "    if (fp == NULL)\n"
3530 "        exit(EXIT_FAILURE);\n"
3531 msgstr ""
3532
3533 #. type: Plain text
3534 #: build/C/man3/getline.3:166
3535 #, no-wrap
3536 msgid ""
3537 "    while ((read = getline(&line, &len, fp)) != -1) {\n"
3538 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
3539 "        printf(\"%s\", line);\n"
3540 "    }\n"
3541 msgstr ""
3542
3543 #. type: Plain text
3544 #: build/C/man3/getline.3:170
3545 #, no-wrap
3546 msgid ""
3547 "    free(line);\n"
3548 "    exit(EXIT_SUCCESS);\n"
3549 "}\n"
3550 msgstr ""
3551
3552 #. type: Plain text
3553 #: build/C/man3/getline.3:178
3554 msgid "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<gets>(3), B<scanf>(3)"
3555 msgstr ""
3556
3557 #. type: TH
3558 #: build/C/man3/gets.3:27
3559 #, no-wrap
3560 msgid "GETS"
3561 msgstr ""
3562
3563 #. type: TH
3564 #: build/C/man3/gets.3:27
3565 #, no-wrap
3566 msgid "2012-01-18"
3567 msgstr ""
3568
3569 #. type: Plain text
3570 #: build/C/man3/gets.3:30
3571 msgid "fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings"
3572 msgstr ""
3573
3574 #. type: Plain text
3575 #: build/C/man3/gets.3:35
3576 #, no-wrap
3577 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
3578 msgstr ""
3579
3580 #. type: Plain text
3581 #: build/C/man3/gets.3:37
3582 #, no-wrap
3583 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
3584 msgstr ""
3585
3586 #. type: Plain text
3587 #: build/C/man3/gets.3:39
3588 #, no-wrap
3589 msgid "B<int getc(FILE *>I<stream>B<);>\n"
3590 msgstr ""
3591
3592 #. type: Plain text
3593 #: build/C/man3/gets.3:41
3594 #, no-wrap
3595 msgid "B<int getchar(void);>\n"
3596 msgstr ""
3597
3598 #. type: Plain text
3599 #: build/C/man3/gets.3:43
3600 #, no-wrap
3601 msgid "B<char *gets(char *>I<s>B<);>\n"
3602 msgstr ""
3603
3604 #. type: Plain text
3605 #: build/C/man3/gets.3:45
3606 #, no-wrap
3607 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
3608 msgstr ""
3609
3610 #. type: Plain text
3611 #: build/C/man3/gets.3:57
3612 msgid ""
3613 "B<fgetc>()  reads the next character from I<stream> and returns it as an "
3614 "I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
3615 msgstr ""
3616
3617 #. type: Plain text
3618 #: build/C/man3/gets.3:64
3619 msgid ""
3620 "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as "
3621 "a macro which evaluates I<stream> more than once."
3622 msgstr ""
3623
3624 #. type: Plain text
3625 #: build/C/man3/gets.3:68
3626 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
3627 msgstr ""
3628
3629 #. type: Plain text
3630 #: build/C/man3/gets.3:78
3631 msgid ""
3632 "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> "
3633 "until either a terminating newline or B<EOF>, which it replaces with a null "
3634 "byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS "
3635 "below)."
3636 msgstr ""
3637
3638 #. type: Plain text
3639 #: build/C/man3/gets.3:92
3640 msgid ""
3641 "B<fgets>()  reads in at most one less than I<size> characters from I<stream> "
3642 "and stores them into the buffer pointed to by I<s>.  Reading stops after an "
3643 "B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A "
3644 "terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character "
3645 "in the buffer."
3646 msgstr ""
3647
3648 #. type: Plain text
3649 #: build/C/man3/gets.3:103
3650 msgid ""
3651 "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where "
3652 "it is available for subsequent read operations.  Pushed-back characters will "
3653 "be returned in reverse order; only one pushback is guaranteed."
3654 msgstr ""
3655
3656 #. type: Plain text
3657 #: build/C/man3/gets.3:108
3658 msgid ""
3659 "Calls to the functions described here can be mixed with each other and with "
3660 "calls to other input functions from the I<stdio> library for the same input "
3661 "stream."
3662 msgstr ""
3663
3664 #. type: Plain text
3665 #: build/C/man3/gets.3:123
3666 msgid ""
3667 "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an "
3668 "I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
3669 msgstr ""
3670
3671 #. type: Plain text
3672 #: build/C/man3/gets.3:131
3673 msgid ""
3674 "B<gets>()  and B<fgets>()  return I<s> on success, and NULL on error or when "
3675 "end of file occurs while no characters have been read."
3676 msgstr ""
3677
3678 #. type: Plain text
3679 #: build/C/man3/gets.3:138
3680 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
3681 msgstr ""
3682
3683 #. type: Plain text
3684 #: build/C/man3/gets.3:140
3685 msgid "C89, C99, POSIX.1-2001."
3686 msgstr ""
3687
3688 #. type: Plain text
3689 #: build/C/man3/gets.3:152
3690 msgid ""
3691 "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO "
3692 "C11 removes the specification of B<gets>()  from the C language, and since "
3693 "version 2.16, glibc header files don't expose the function declaration if "
3694 "the B<_ISOC11_SOURCE> feature test macro is defined."
3695 msgstr ""
3696
3697 #. type: Plain text
3698 #: build/C/man3/gets.3:166
3699 msgid ""
3700 "Never use B<gets>().  Because it is impossible to tell without knowing the "
3701 "data in advance how many characters B<gets>()  will read, and because "
3702 "B<gets>()  will continue to store characters past the end of the buffer, it "
3703 "is extremely dangerous to use.  It has been used to break computer "
3704 "security.  Use B<fgets>()  instead."
3705 msgstr ""
3706
3707 #. type: Plain text
3708 #: build/C/man3/gets.3:173
3709 msgid ""
3710 "It is not advisable to mix calls to input functions from the I<stdio> "
3711 "library with low-level calls to B<read>(2)  for the file descriptor "
3712 "associated with the input stream; the results will be undefined and very "
3713 "probably not what you want."
3714 msgstr ""
3715
3716 #. type: Plain text
3717 #: build/C/man3/gets.3:189
3718 msgid ""
3719 "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), "
3720 "B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), "
3721 "B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), "
3722 "B<feature_test_macros>(7)"
3723 msgstr ""
3724
3725 #. type: TH
3726 #: build/C/man3/getw.3:25
3727 #, no-wrap
3728 msgid "GETW"
3729 msgstr ""
3730
3731 #. type: TH
3732 #: build/C/man3/getw.3:25
3733 #, no-wrap
3734 msgid "2010-09-26"
3735 msgstr ""
3736
3737 #. type: Plain text
3738 #: build/C/man3/getw.3:28
3739 msgid "getw, putw - input and output of words (ints)"
3740 msgstr ""
3741
3742 #. type: Plain text
3743 #: build/C/man3/getw.3:33
3744 #, no-wrap
3745 msgid "B<int getw(FILE *>I<stream>B<);>\n"
3746 msgstr ""
3747
3748 #. type: Plain text
3749 #: build/C/man3/getw.3:35
3750 #, no-wrap
3751 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
3752 msgstr ""
3753
3754 #. type: Plain text
3755 #: build/C/man3/getw.3:44
3756 msgid "B<getw>(), B<putw>():"
3757 msgstr ""
3758
3759 #. type: TP
3760 #: build/C/man3/getw.3:47
3761 #, no-wrap
3762 msgid "Since glibc 2.3.3:"
3763 msgstr ""
3764
3765 #. type: Plain text
3766 #: build/C/man3/getw.3:50
3767 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
3768 msgstr ""
3769
3770 #. type: Plain text
3771 #: build/C/man3/getw.3:53
3772 #, no-wrap
3773 msgid ""
3774 "(_XOPEN_SOURCE &&\n"
3775 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
3776 msgstr ""
3777
3778 #. type: TP
3779 #: build/C/man3/getw.3:53
3780 #, no-wrap
3781 msgid "Before glibc 2.3.3:"
3782 msgstr ""
3783
3784 #. type: Plain text
3785 #: build/C/man3/getw.3:56
3786 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
3787 msgstr ""
3788
3789 #. type: Plain text
3790 #: build/C/man3/getw.3:66
3791 msgid ""
3792 "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided "
3793 "for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
3794 msgstr ""
3795
3796 #. type: Plain text
3797 #: build/C/man3/getw.3:73
3798 msgid ""
3799 "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is "
3800 "provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  "
3801 "instead."
3802 msgstr ""
3803
3804 #. type: Plain text
3805 #: build/C/man3/getw.3:80
3806 msgid ""
3807 "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On "
3808 "error, they return B<EOF>."
3809 msgstr ""
3810
3811 #. type: Plain text
3812 #: build/C/man3/getw.3:82
3813 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
3814 msgstr ""
3815
3816 #. type: Plain text
3817 #: build/C/man3/getw.3:86
3818 msgid ""
3819 "The value returned on error is also a legitimate data value.  B<ferror>(3)  "
3820 "can be used to distinguish between the two cases."
3821 msgstr ""
3822
3823 #. type: Plain text
3824 #: build/C/man3/getw.3:92
3825 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
3826 msgstr ""
3827
3828 #. type: TH
3829 #: build/C/man2/link.2:31
3830 #, no-wrap
3831 msgid "LINK"
3832 msgstr ""
3833
3834 #. type: TH
3835 #: build/C/man2/link.2:31 build/C/man2/rename.2:32 build/C/man2/symlink.2:32 build/C/man2/write.2:39
3836 #, no-wrap
3837 msgid "2013-01-27"
3838 msgstr ""
3839
3840 #. type: Plain text
3841 #: build/C/man2/link.2:34
3842 msgid "link - make a new name for a file"
3843 msgstr ""
3844
3845 #. type: Plain text
3846 #: build/C/man2/link.2:36 build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34 build/C/man2/readlink.2:48 build/C/man2/rmdir.2:35 build/C/man2/symlink.2:37 build/C/man2/unlink.2:37 build/C/man2/write.2:44
3847 msgid "B<#include E<lt>unistd.hE<gt>>"
3848 msgstr ""
3849
3850 #. type: Plain text
3851 #: build/C/man2/link.2:38
3852 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
3853 msgstr ""
3854
3855 #. type: Plain text
3856 #: build/C/man2/link.2:41
3857 msgid ""
3858 "B<link>()  creates a new link (also known as a hard link) to an existing "
3859 "file."
3860 msgstr ""
3861
3862 #. type: Plain text
3863 #: build/C/man2/link.2:47 build/C/man2/symlink.2:84
3864 msgid "If I<newpath> exists it will I<not> be overwritten."
3865 msgstr ""
3866
3867 #. type: Plain text
3868 #: build/C/man2/link.2:52
3869 msgid ""
3870 "This new name may be used exactly as the old one for any operation; both "
3871 "names refer to the same file (and so have the same permissions and "
3872 "ownership) and it is impossible to tell which name was the \"original\"."
3873 msgstr ""
3874
3875 #. type: Plain text
3876 #: build/C/man2/link.2:57 build/C/man2/pipe.2:97 build/C/man3/remove.3:65 build/C/man2/rename.2:96 build/C/man2/rmdir.2:45 build/C/man2/symlink.2:89 build/C/man2/unlink.2:60
3877 msgid ""
3878 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
3879 "appropriately."
3880 msgstr ""
3881
3882 #. type: TP
3883 #: build/C/man2/link.2:58 build/C/man2/open.2:486 build/C/man2/readlink.2:86 build/C/man2/rename.2:97 build/C/man2/rmdir.2:46 build/C/man2/symlink.2:90 build/C/man3/tmpfile.3:57 build/C/man2/unlink.2:61
3884 #, no-wrap
3885 msgid "B<EACCES>"
3886 msgstr ""
3887
3888 #. type: Plain text
3889 #: build/C/man2/link.2:69
3890 msgid ""
3891 "Write access to the directory containing I<newpath> is denied, or search "
3892 "permission is denied for one of the directories in the path prefix of "
3893 "I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
3894 msgstr ""
3895
3896 #. type: TP
3897 #: build/C/man2/link.2:69 build/C/man2/open.2:495 build/C/man2/rename.2:133 build/C/man2/symlink.2:99 build/C/man2/write.2:135
3898 #, no-wrap
3899 msgid "B<EDQUOT>"
3900 msgstr ""
3901
3902 #. type: Plain text
3903 #: build/C/man2/link.2:72 build/C/man2/rename.2:136
3904 msgid "The user's quota of disk blocks on the file system has been exhausted."
3905 msgstr ""
3906
3907 #. type: TP
3908 #: build/C/man2/link.2:72 build/C/man2/open.2:501 build/C/man2/symlink.2:104 build/C/man3/tmpfile.3:60
3909 #, no-wrap
3910 msgid "B<EEXIST>"
3911 msgstr ""
3912
3913 #. type: Plain text
3914 #: build/C/man2/link.2:76 build/C/man2/symlink.2:108
3915 msgid "I<newpath> already exists."
3916 msgstr ""
3917
3918 #. type: TP
3919 #: build/C/man2/link.2:76 build/C/man2/llseek.2:74 build/C/man2/open.2:507 build/C/man2/pipe.2:98 build/C/man2/read.2:118 build/C/man2/readlink.2:91 build/C/man2/rename.2:136 build/C/man2/rmdir.2:64 build/C/man2/symlink.2:108 build/C/man2/unlink.2:80 build/C/man2/write.2:141
3920 #, no-wrap
3921 msgid "B<EFAULT>"
3922 msgstr ""
3923
3924 #. type: Plain text
3925 #: build/C/man2/link.2:79 build/C/man2/rename.2:139 build/C/man2/symlink.2:111
3926 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
3927 msgstr ""
3928
3929 #. type: TP
3930 #: build/C/man2/link.2:79 build/C/man2/read.2:147 build/C/man2/readlink.2:107 build/C/man2/symlink.2:111 build/C/man2/unlink.2:84 build/C/man2/write.2:165
3931 #, no-wrap
3932 msgid "B<EIO>"
3933 msgstr ""
3934
3935 #. type: Plain text
3936 #: build/C/man2/link.2:82 build/C/man2/symlink.2:114 build/C/man2/unlink.2:87
3937 msgid "An I/O error occurred."
3938 msgstr ""
3939
3940 #. type: TP
3941 #: build/C/man2/link.2:82 build/C/man2/open.2:531 build/C/man2/readlink.2:110 build/C/man2/rename.2:149 build/C/man2/rmdir.2:73 build/C/man2/symlink.2:114 build/C/man2/unlink.2:92
3942 #, no-wrap
3943 msgid "B<ELOOP>"
3944 msgstr ""
3945
3946 #. type: Plain text
3947 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
3948 msgid ""
3949 "Too many symbolic links were encountered in resolving I<oldpath> or "
3950 "I<newpath>."
3951 msgstr ""
3952
3953 #. type: TP
3954 #: build/C/man2/link.2:86 build/C/man2/rename.2:153
3955 #, no-wrap
3956 msgid "B<EMLINK>"
3957 msgstr ""
3958
3959 #. type: Plain text
3960 #: build/C/man2/link.2:91
3961 msgid ""
3962 "The file referred to by I<oldpath> already has the maximum number of links "
3963 "to it."
3964 msgstr ""
3965
3966 #. type: TP
3967 #: build/C/man2/link.2:91 build/C/man2/open.2:541 build/C/man2/readlink.2:113 build/C/man2/rename.2:160 build/C/man2/rmdir.2:77 build/C/man2/symlink.2:118 build/C/man2/unlink.2:96
3968 #, no-wrap
3969 msgid "B<ENAMETOOLONG>"
3970 msgstr ""
3971
3972 #. type: Plain text
3973 #: build/C/man2/link.2:94 build/C/man2/rename.2:163 build/C/man2/symlink.2:121
3974 msgid "I<oldpath> or I<newpath> was too long."
3975 msgstr ""
3976
3977 #. type: TP
3978 #: build/C/man2/link.2:94 build/C/man2/open.2:555 build/C/man2/readlink.2:116 build/C/man2/rename.2:163 build/C/man2/rmdir.2:80 build/C/man2/symlink.2:121 build/C/man2/unlink.2:99
3979 #, no-wrap
3980 msgid "B<ENOENT>"
3981 msgstr ""
3982
3983 #. type: Plain text
3984 #: build/C/man2/link.2:99
3985 msgid ""
3986 "A directory component in I<oldpath> or I<newpath> does not exist or is a "
3987 "dangling symbolic link."
3988 msgstr ""
3989
3990 #. type: TP
3991 #: build/C/man2/link.2:99 build/C/man2/open.2:562 build/C/man2/readlink.2:119 build/C/man2/rename.2:176 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570 build/C/man2/symlink.2:128 build/C/man3/tempnam.3:95 build/C/man2/unlink.2:106
3992 #, no-wrap
3993 msgid "B<ENOMEM>"
3994 msgstr ""
3995
3996 #. type: Plain text
3997 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/readlink.2:122 build/C/man2/rename.2:179 build/C/man2/rmdir.2:88 build/C/man2/symlink.2:131 build/C/man2/unlink.2:109
3998 msgid "Insufficient kernel memory was available."
3999 msgstr ""
4000
4001 #. type: TP
4002 #: build/C/man2/link.2:102 build/C/man2/open.2:565 build/C/man2/rename.2:179 build/C/man2/symlink.2:131 build/C/man3/tmpfile.3:72 build/C/man2/write.2:168
4003 #, no-wrap
4004 msgid "B<ENOSPC>"
4005 msgstr ""
4006
4007 #. type: Plain text
4008 #: build/C/man2/link.2:106 build/C/man2/rename.2:183 build/C/man2/symlink.2:135
4009 msgid "The device containing the file has no room for the new directory entry."
4010 msgstr ""
4011
4012 #. type: TP
4013 #: build/C/man2/link.2:106 build/C/man2/open.2:571 build/C/man2/readlink.2:122 build/C/man2/rename.2:183 build/C/man2/rmdir.2:88 build/C/man2/symlink.2:135 build/C/man2/unlink.2:109
4014 #, no-wrap
4015 msgid "B<ENOTDIR>"
4016 msgstr ""
4017
4018 #. type: Plain text
4019 #: build/C/man2/link.2:111
4020 msgid ""
4021 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
4022 "a directory."
4023 msgstr ""
4024
4025 #. type: TP
4026 #: build/C/man2/link.2:111 build/C/man2/link.2:115 build/C/man2/open.2:604 build/C/man2/rmdir.2:107 build/C/man2/rmdir.2:118 build/C/man2/symlink.2:140 build/C/man2/unlink.2:114
4027 #, no-wrap
4028 msgid "B<EPERM>"
4029 msgstr ""
4030
4031 #. type: Plain text
4032 #: build/C/man2/link.2:115
4033 msgid "I<oldpath> is a directory."
4034 msgstr ""
4035
4036 #. type: Plain text
4037 #: build/C/man2/link.2:120
4038 msgid ""
4039 "The file system containing I<oldpath> and I<newpath> does not support the "
4040 "creation of hard links."
4041 msgstr ""
4042
4043 #. type: TP
4044 #: build/C/man2/link.2:120
4045 #, no-wrap
4046 msgid "B<EPERM> (since Linux 3.6)"
4047 msgstr ""
4048
4049 #. type: Plain text
4050 #: build/C/man2/link.2:127
4051 msgid ""
4052 "The caller does not have permission to create a hard link to this file (see "
4053 "the description of I</proc/sys/fs/protected_hardlink> in B<proc>(5))."
4054 msgstr ""
4055
4056 #. type: TP
4057 #: build/C/man2/link.2:127 build/C/man2/open.2:612 build/C/man2/rename.2:221 build/C/man2/rmdir.2:123 build/C/man2/symlink.2:145 build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:137
4058 #, no-wrap
4059 msgid "B<EROFS>"
4060 msgstr ""
4061
4062 #. type: Plain text
4063 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
4064 msgid "The file is on a read-only file system."
4065 msgstr ""
4066
4067 #. type: TP
4068 #: build/C/man2/link.2:130 build/C/man2/rename.2:224
4069 #, no-wrap
4070 msgid "B<EXDEV>"
4071 msgstr ""
4072
4073 #. type: Plain text
4074 #: build/C/man2/link.2:138
4075 msgid ""
4076 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
4077 "permits a file system to be mounted at multiple points, but B<link>()  does "
4078 "not work across different mount points, even if the same file system is "
4079 "mounted on both.)"
4080 msgstr ""
4081
4082 #.  SVr4 documents additional ENOLINK and
4083 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
4084 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
4085 #. type: Plain text
4086 #: build/C/man2/link.2:143
4087 msgid "SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES)."
4088 msgstr ""
4089
4090 #. type: Plain text
4091 #: build/C/man2/link.2:150
4092 msgid ""
4093 "Hard links, as created by B<link>(), cannot span file systems.  Use "
4094 "B<symlink>(2)  if this is required."
4095 msgstr ""
4096
4097 #.  more precisely: since kernel 1.3.56
4098 #.  For example, the default Solaris compilation environment
4099 #.  behaves like Linux, and contributors to a March 2005
4100 #.  thread in the Austin mailing list reported that some
4101 #.  other (System V) implementations did/do the same -- MTK, Apr 05
4102 #. type: Plain text
4103 #: build/C/man2/link.2:181
4104 msgid ""
4105 "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a "
4106 "symbolic link.  However, since kernel 2.0, Linux does not do so: if "
4107 "I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link "
4108 "to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to "
4109 "the same file that I<oldpath> refers to).  Some other implementations behave "
4110 "in the same manner as Linux.  POSIX.1-2008 changes the specification of "
4111 "B<link>(), making it implementation-dependent whether or not I<oldpath> is "
4112 "dereferenced if it is a symbolic link.  For precise control over the "
4113 "treatment of symbolic links when creating a link, see B<linkat>(2)."
4114 msgstr ""
4115
4116 #. type: Plain text
4117 #: build/C/man2/link.2:187
4118 msgid ""
4119 "On NFS file systems, the return code may be wrong in case the NFS server "
4120 "performs the link creation and dies before it can say so.  Use B<stat>(2)  "
4121 "to find out if the link got created."
4122 msgstr ""
4123
4124 #. type: Plain text
4125 #: build/C/man2/link.2:197
4126 msgid ""
4127 "B<ln>(1), B<linkat>(2), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), "
4128 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
4129 msgstr ""
4130
4131 #. type: TH
4132 #: build/C/man2/llseek.2:28
4133 #, no-wrap
4134 msgid "LLSEEK"
4135 msgstr ""
4136
4137 #. type: TH
4138 #: build/C/man2/llseek.2:28
4139 #, no-wrap
4140 msgid "2012-07-13"
4141 msgstr ""
4142
4143 #. type: Plain text
4144 #: build/C/man2/llseek.2:31
4145 msgid "_llseek - reposition read/write file offset"
4146 msgstr ""
4147
4148 #. type: Plain text
4149 #: build/C/man2/llseek.2:35
4150 #, no-wrap
4151 msgid ""
4152 "B<#include E<lt>sys/types.hE<gt>>\n"
4153 "B<#include E<lt>unistd.hE<gt>>\n"
4154 msgstr ""
4155
4156 #. type: Plain text
4157 #: build/C/man2/llseek.2:39
4158 #, no-wrap
4159 msgid ""
4160 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
4161 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
4162 "B<            unsigned int >I<whence>B<);>\n"
4163 msgstr ""
4164
4165 #. type: Plain text
4166 #: build/C/man2/llseek.2:43
4167 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
4168 msgstr ""
4169
4170 #. type: Plain text
4171 #: build/C/man2/llseek.2:62
4172 msgid ""
4173 "The B<_llseek>()  function repositions the offset of the open file "
4174 "associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | "
4175 "offset_low> bytes relative to the beginning of the file, the current "
4176 "position in the file, or the end of the file, depending on whether I<whence> "
4177 "is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the "
4178 "resulting file position in the argument I<result>."
4179 msgstr ""
4180
4181 #. type: Plain text
4182 #: build/C/man2/llseek.2:69
4183 msgid ""
4184 "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of "
4185 "-1 is returned and I<errno> is set to indicate the error."
4186 msgstr ""
4187
4188 #. type: Plain text
4189 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:175
4190 msgid "I<fd> is not an open file descriptor."
4191 msgstr ""
4192
4193 #. type: Plain text
4194 #: build/C/man2/llseek.2:77
4195 msgid "Problem with copying results to user space."
4196 msgstr ""
4197
4198 #. type: Plain text
4199 #: build/C/man2/llseek.2:81
4200 msgid "I<whence> is invalid."
4201 msgstr ""
4202
4203 #. type: Plain text
4204 #: build/C/man2/llseek.2:84
4205 msgid ""
4206 "This function is Linux-specific, and should not be used in programs intended "
4207 "to be portable."
4208 msgstr ""
4209
4210 #. type: Plain text
4211 #: build/C/man2/llseek.2:87
4212 msgid ""
4213 "Glibc does not provide a wrapper for this system call; call it using "
4214 "B<syscall>(2)."
4215 msgstr ""
4216
4217 #. type: Plain text
4218 #: build/C/man2/llseek.2:90
4219 msgid "B<lseek>(2), B<lseek64>(3)"
4220 msgstr ""
4221
4222 #. type: TH
4223 #: build/C/man2/lseek.2:47
4224 #, no-wrap
4225 msgid "LSEEK"
4226 msgstr ""
4227
4228 #. type: TH
4229 #: build/C/man2/lseek.2:47
4230 #, no-wrap
4231 msgid "2013-03-27"
4232 msgstr ""
4233
4234 #. type: Plain text
4235 #: build/C/man2/lseek.2:50
4236 msgid "lseek - reposition read/write file offset"
4237 msgstr ""
4238
4239 #. type: Plain text
4240 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
4241 msgid "B<#include E<lt>sys/types.hE<gt>>"
4242 msgstr ""
4243
4244 #. type: Plain text
4245 #: build/C/man2/lseek.2:56
4246 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
4247 msgstr ""
4248
4249 #. type: Plain text
4250 #: build/C/man2/lseek.2:67
4251 msgid ""
4252 "The B<lseek>()  function repositions the offset of the open file associated "
4253 "with the file descriptor I<fd> to the argument I<offset> according to the "
4254 "directive I<whence> as follows:"
4255 msgstr ""
4256
4257 #. type: Plain text
4258 #: build/C/man2/lseek.2:72
4259 msgid "The offset is set to I<offset> bytes."
4260 msgstr ""
4261
4262 #. type: Plain text
4263 #: build/C/man2/lseek.2:77
4264 msgid "The offset is set to its current location plus I<offset> bytes."
4265 msgstr ""
4266
4267 #. type: Plain text
4268 #: build/C/man2/lseek.2:82
4269 msgid "The offset is set to the size of the file plus I<offset> bytes."
4270 msgstr ""
4271
4272 #. type: Plain text
4273 #: build/C/man2/lseek.2:90
4274 msgid ""
4275 "The B<lseek>()  function allows the file offset to be set beyond the end of "
4276 "the file (but this does not change the size of the file).  If data is later "
4277 "written at this point, subsequent reads of the data in the gap (a \"hole\") "
4278 "return null bytes (\\(aq\\e0\\(aq) until data is actually written into the "
4279 "gap."
4280 msgstr ""
4281
4282 #. type: SS
4283 #: build/C/man2/lseek.2:90
4284 #, no-wrap
4285 msgid "Seeking file data and holes"
4286 msgstr ""
4287
4288 #. type: Plain text
4289 #: build/C/man2/lseek.2:93
4290 msgid ""
4291 "Since version 3.1, Linux supports the following additional values for "
4292 "I<whence>:"
4293 msgstr ""
4294
4295 #. type: TP
4296 #: build/C/man2/lseek.2:93
4297 #, no-wrap
4298 msgid "B<SEEK_DATA>"
4299 msgstr ""
4300
4301 #. type: Plain text
4302 #: build/C/man2/lseek.2:104
4303 msgid ""
4304 "Adjust the file offset to the next location in the file greater than or "
4305 "equal to I<offset> containing data.  If I<offset> points to data, then the "
4306 "file offset is set to I<offset>."
4307 msgstr ""
4308
4309 #. type: TP
4310 #: build/C/man2/lseek.2:104
4311 #, no-wrap
4312 msgid "B<SEEK_HOLE>"
4313 msgstr ""
4314
4315 #. type: Plain text
4316 #: build/C/man2/lseek.2:118
4317 msgid ""
4318 "Adjust the file offset to the next hole in the file greater than or equal to "
4319 "I<offset>.  If I<offset> points into the middle of a hole, then the file "
4320 "offset is set to I<offset>.  If there is no hole past I<offset>, then the "
4321 "file offset is adjusted to the end of the file (i.e., there is an implicit "
4322 "hole at the end of any file)."
4323 msgstr ""
4324
4325 #. type: Plain text
4326 #: build/C/man2/lseek.2:124
4327 msgid ""
4328 "In both of the above cases, B<lseek>()  fails if I<offset> points past the "
4329 "end of the file."
4330 msgstr ""
4331
4332 #. type: Plain text
4333 #: build/C/man2/lseek.2:130
4334 msgid ""
4335 "These operations allow applications to map holes in a sparsely allocated "
4336 "file.  This can be useful for applications such as file backup tools, which "
4337 "can save space when creating backups and preserve holes, if they have a "
4338 "mechanism for discovering holes."
4339 msgstr ""
4340
4341 #.  https://lkml.org/lkml/2011/4/22/79
4342 #.  http://lwn.net/Articles/440255/
4343 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
4344 #. type: Plain text
4345 #: build/C/man2/lseek.2:153
4346 msgid ""
4347 "For the purposes of these operations, a hole is a sequence of zeros that "
4348 "(normally) has not been allocated in the underlying file storage.  However, "
4349 "a file system is not obliged to report holes, so these operations are not a "
4350 "guaranteed mechanism for mapping the storage space actually allocated to a "
4351 "file.  (Furthermore, a sequence of zeros that actually has been written to "
4352 "the underlying storage may not be reported as a hole.)  In the simplest "
4353 "implementation, a file system can support the operations by making "
4354 "B<SEEK_HOLE> always return the offset of the end of the file, and making "
4355 "B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to "
4356 "by I<offset> is a hole, it can be considered to consist of data that is a "
4357 "sequence of zeros)."
4358 msgstr ""
4359
4360 #. type: Plain text
4361 #: build/C/man2/lseek.2:162
4362 msgid ""
4363 "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the "
4364 "definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
4365 msgstr ""
4366
4367 #. type: Plain text
4368 #: build/C/man2/lseek.2:170
4369 msgid ""
4370 "Upon successful completion, B<lseek>()  returns the resulting offset "
4371 "location as measured in bytes from the beginning of the file.  On error, the "
4372 "value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
4373 msgstr ""
4374
4375 #.  Some systems may allow negative offsets for character devices
4376 #.  and/or for remote file systems.
4377 #. type: Plain text
4378 #: build/C/man2/lseek.2:183
4379 msgid ""
4380 "I<whence> is not valid.  Or: the resulting file offset would be negative, or "
4381 "beyond the end of a seekable device."
4382 msgstr ""
4383
4384 #. type: TP
4385 #: build/C/man2/lseek.2:183 build/C/man2/open.2:584
4386 #, no-wrap
4387 msgid "B<EOVERFLOW>"
4388 msgstr ""
4389
4390 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
4391 #. type: Plain text
4392 #: build/C/man2/lseek.2:188
4393 msgid "The resulting file offset cannot be represented in an I<off_t>."
4394 msgstr ""
4395
4396 #. type: TP
4397 #: build/C/man2/lseek.2:188
4398 #, no-wrap
4399 msgid "B<ESPIPE>"
4400 msgstr ""
4401
4402 #. type: Plain text
4403 #: build/C/man2/lseek.2:192
4404 msgid "I<fd> is associated with a pipe, socket, or FIFO."
4405 msgstr ""
4406
4407 #. type: TP
4408 #: build/C/man2/lseek.2:192 build/C/man2/open.2:578
4409 #, no-wrap
4410 msgid "B<ENXIO>"
4411 msgstr ""
4412
4413 #. type: Plain text
4414 #: build/C/man2/lseek.2:200
4415 msgid ""
4416 "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is "
4417 "beyond the end of the file."
4418 msgstr ""
4419
4420 #.  SVr4 documents additional error
4421 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
4422 #. type: Plain text
4423 #: build/C/man2/lseek.2:202 build/C/man2/read.2:175 build/C/man2/rmdir.2:129 build/C/man2/symlink.2:155 build/C/man2/unlink.2:145 build/C/man2/write.2:189
4424 msgid "SVr4, 4.3BSD, POSIX.1-2001."
4425 msgstr ""
4426
4427 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
4428 #. type: Plain text
4429 #: build/C/man2/lseek.2:210
4430 msgid ""
4431 "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in "
4432 "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the "
4433 "next POSIX revision (Issue 8)."
4434 msgstr ""
4435
4436 #. type: Plain text
4437 #: build/C/man2/lseek.2:214
4438 msgid ""
4439 "Some devices are incapable of seeking and POSIX does not specify which "
4440 "devices must support B<lseek>()."
4441 msgstr ""
4442
4443 #.  Other systems return the number of written characters,
4444 #.  using SEEK_SET to set the counter. (Of written characters.)
4445 #. type: Plain text
4446 #: build/C/man2/lseek.2:221
4447 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
4448 msgstr ""
4449
4450 #. type: Plain text
4451 #: build/C/man2/lseek.2:224
4452 msgid ""
4453 "When converting old code, substitute values for I<whence> with the following "
4454 "macros:"
4455 msgstr ""
4456
4457 #. type: tbl table
4458 #: build/C/man2/lseek.2:227
4459 #, no-wrap
4460 msgid "old\tnew\n"
4461 msgstr ""
4462
4463 #. type: tbl table
4464 #: build/C/man2/lseek.2:228
4465 #, no-wrap
4466 msgid "0\tSEEK_SET\n"
4467 msgstr ""
4468
4469 #. type: tbl table
4470 #: build/C/man2/lseek.2:229
4471 #, no-wrap
4472 msgid "1\tSEEK_CUR\n"
4473 msgstr ""
4474
4475 #. type: tbl table
4476 #: build/C/man2/lseek.2:230
4477 #, no-wrap
4478 msgid "2\tSEEK_END\n"
4479 msgstr ""
4480
4481 #. type: tbl table
4482 #: build/C/man2/lseek.2:231
4483 #, no-wrap
4484 msgid "L_SET\tSEEK_SET\n"
4485 msgstr ""
4486
4487 #. type: tbl table
4488 #: build/C/man2/lseek.2:232
4489 #, no-wrap
4490 msgid "L_INCR\tSEEK_CUR\n"
4491 msgstr ""
4492
4493 #. type: tbl table
4494 #: build/C/man2/lseek.2:233
4495 #, no-wrap
4496 msgid "L_XTND\tSEEK_END\n"
4497 msgstr ""
4498
4499 #. type: Plain text
4500 #: build/C/man2/lseek.2:245
4501 msgid ""
4502 "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the "
4503 "current file position pointer, so seeking on such files may be subject to "
4504 "race conditions."
4505 msgstr ""
4506
4507 #. type: Plain text
4508 #: build/C/man2/lseek.2:252
4509 msgid ""
4510 "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), "
4511 "B<posix_fallocate>(3)"
4512 msgstr ""
4513
4514 #. type: TH
4515 #: build/C/man3/lseek64.3:25
4516 #, no-wrap
4517 msgid "LSEEK64"
4518 msgstr ""
4519
4520 #. type: TH
4521 #: build/C/man3/lseek64.3:25
4522 #, no-wrap
4523 msgid "2004-12-11"
4524 msgstr ""
4525
4526 #. type: Plain text
4527 #: build/C/man3/lseek64.3:28
4528 msgid "lseek64 - reposition 64-bit read/write file offset"
4529 msgstr ""
4530
4531 #. type: Plain text
4532 #: build/C/man3/lseek64.3:30
4533 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
4534 msgstr ""
4535
4536 #. type: Plain text
4537 #: build/C/man3/lseek64.3:36
4538 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
4539 msgstr ""
4540
4541 #. type: Plain text
4542 #: build/C/man3/lseek64.3:53
4543 msgid ""
4544 "The B<lseek>(2)  family of functions reposition the offset of the open file "
4545 "associated with the file descriptor I<fd> to I<offset> bytes relative to the "
4546 "start, current position, or end of the file, when I<whence> has the value "
4547 "B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
4548 msgstr ""
4549
4550 #. type: Plain text
4551 #: build/C/man3/lseek64.3:56
4552 msgid "For more details, return value, and errors, see B<lseek>(2)."
4553 msgstr ""
4554
4555 #. type: Plain text
4556 #: build/C/man3/lseek64.3:63
4557 msgid ""
4558 "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and "
4559 "the raw system call B<_llseek>(2)."
4560 msgstr ""
4561
4562 #. type: SS
4563 #: build/C/man3/lseek64.3:63
4564 #, no-wrap
4565 msgid "lseek"
4566 msgstr ""
4567
4568 #. type: Plain text
4569 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87 build/C/man3/lseek64.3:116
4570 msgid "Prototype:"
4571 msgstr ""
4572
4573 #. type: Plain text
4574 #: build/C/man3/lseek64.3:69
4575 #, no-wrap
4576 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4577 msgstr ""
4578
4579 #. type: Plain text
4580 #: build/C/man3/lseek64.3:77
4581 msgid ""
4582 "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit "
4583 "architectures, unless one compiles with"
4584 msgstr ""
4585
4586 #. type: Plain text
4587 #: build/C/man3/lseek64.3:85
4588 msgid "in which case it is a 64-bit signed type."
4589 msgstr ""
4590
4591 #. type: SS
4592 #: build/C/man3/lseek64.3:85
4593 #, no-wrap
4594 msgid "lseek64"
4595 msgstr ""
4596
4597 #. type: Plain text
4598 #: build/C/man3/lseek64.3:91
4599 #, no-wrap
4600 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
4601 msgstr ""
4602
4603 #. type: Plain text
4604 #: build/C/man3/lseek64.3:102
4605 msgid ""
4606 "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a "
4607 "32-bit type.  Its prototype (and the type I<off64_t>)  is available only "
4608 "when one compiles with"
4609 msgstr ""
4610
4611 #. type: Plain text
4612 #: build/C/man3/lseek64.3:106
4613 #, no-wrap
4614 msgid "#define _LARGEFILE64_SOURCE\n"
4615 msgstr ""
4616
4617 #.  in glibc 2.0.94, not in 2.0.6
4618 #. type: Plain text
4619 #: build/C/man3/lseek64.3:114
4620 msgid ""
4621 "The function B<lseek64>()  is available since glibc 2.1, and is defined to "
4622 "be an alias for B<llseek>()."
4623 msgstr ""
4624
4625 #. type: SS
4626 #: build/C/man3/lseek64.3:114
4627 #, no-wrap
4628 msgid "llseek"
4629 msgstr ""
4630
4631 #. type: Plain text
4632 #: build/C/man3/lseek64.3:120
4633 #, no-wrap
4634 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
4635 msgstr ""
4636
4637 #.  in libc 5.0.9, not in 4.7.6
4638 #. type: Plain text
4639 #: build/C/man3/lseek64.3:139
4640 msgid ""
4641 "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>()  "
4642 "is available in libc5 and glibc and works without special defines.  Its "
4643 "prototype was given in I<E<lt>unistd.hE<gt>> with libc5, but glibc does not "
4644 "provide a prototype.  This is bad, since a prototype is needed.  Users "
4645 "should add the above prototype, or something equivalent, to their own "
4646 "source.  When users complained about data loss caused by a miscompilation of "
4647 "B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
4648 msgstr ""
4649
4650 #. type: Plain text
4651 #: build/C/man3/lseek64.3:142
4652 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
4653 msgstr ""
4654
4655 #. type: Plain text
4656 #: build/C/man3/lseek64.3:146
4657 msgid "This makes this function unusable if one desires a warning-free compilation."
4658 msgstr ""
4659
4660 #. type: SS
4661 #: build/C/man3/lseek64.3:146
4662 #, no-wrap
4663 msgid "_llseek"
4664 msgstr ""
4665
4666 #. type: Plain text
4667 #: build/C/man3/lseek64.3:149
4668 msgid ""
4669 "All the above functions are implemented in terms of this system call.  The "
4670 "prototype is:"
4671 msgstr ""
4672
4673 #. type: Plain text
4674 #: build/C/man3/lseek64.3:154
4675 #, no-wrap
4676 msgid ""
4677 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
4678 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
4679 msgstr ""
4680
4681 #. type: Plain text
4682 #: build/C/man3/lseek64.3:159
4683 msgid "For more details, see B<llseek>(2)."
4684 msgstr ""
4685
4686 #. type: Plain text
4687 #: build/C/man3/lseek64.3:162
4688 msgid "B<llseek>(2), B<lseek>(2)"
4689 msgstr ""
4690
4691 #. type: TH
4692 #: build/C/man2/open.2:52
4693 #, no-wrap
4694 msgid "OPEN"
4695 msgstr ""
4696
4697 #. type: TH
4698 #: build/C/man2/open.2:52
4699 #, no-wrap
4700 msgid "2013-02-18"
4701 msgstr ""
4702
4703 #. type: Plain text
4704 #: build/C/man2/open.2:55
4705 msgid "open, creat - open and possibly create a file or device"
4706 msgstr ""
4707
4708 #. type: Plain text
4709 #: build/C/man2/open.2:60
4710 #, no-wrap
4711 msgid ""
4712 "B<#include E<lt>sys/types.hE<gt>>\n"
4713 "B<#include E<lt>sys/stat.hE<gt>>\n"
4714 "B<#include E<lt>fcntl.hE<gt>>\n"
4715 msgstr ""
4716
4717 #. type: Plain text
4718 #: build/C/man2/open.2:63
4719 #, no-wrap
4720 msgid ""
4721 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
4722 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t "
4723 ">I<mode>B<);>\n"
4724 msgstr ""
4725
4726 #. type: Plain text
4727 #: build/C/man2/open.2:65
4728 #, no-wrap
4729 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
4730 msgstr ""
4731
4732 #. type: Plain text
4733 #: build/C/man2/open.2:76
4734 msgid ""
4735 "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a "
4736 "small, nonnegative integer for use in subsequent system calls (B<read>(2), "
4737 "B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned "
4738 "by a successful call will be the lowest-numbered file descriptor not "
4739 "currently open for the process."
4740 msgstr ""
4741
4742 #. type: Plain text
4743 #: build/C/man2/open.2:88
4744 msgid ""
4745 "By default, the new file descriptor is set to remain open across an "
4746 "B<execve>(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in "
4747 "B<fcntl>(2)  is initially disabled; the B<O_CLOEXEC> flag, described below, "
4748 "can be used to change this default).  The file offset is set to the "
4749 "beginning of the file (see B<lseek>(2))."
4750 msgstr ""
4751
4752 #. type: Plain text
4753 #: build/C/man2/open.2:107
4754 msgid ""
4755 "A call to B<open>()  creates a new I<open file description>, an entry in the "
4756 "system-wide table of open files.  This entry records the file offset and the "
4757 "file status flags (modifiable via the B<fcntl>(2)  B<F_SETFL> operation).  A "
4758 "file descriptor is a reference to one of these entries; this reference is "
4759 "unaffected if I<pathname> is subsequently removed or modified to refer to a "
4760 "different file.  The new open file description is initially not shared with "
4761 "any other process, but sharing may arise via B<fork>(2)."
4762 msgstr ""
4763
4764 #. type: Plain text
4765 #: build/C/man2/open.2:115
4766 msgid ""
4767 "The argument I<flags> must include one of the following I<access modes>: "
4768 "B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file "
4769 "read-only, write-only, or read/write, respectively."
4770 msgstr ""
4771
4772 #.  SUSv4 divides the flags into:
4773 #.  * Access mode
4774 #.  * File creation
4775 #.  * File status
4776 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
4777 #.  though it's not clear what the difference between "other" and
4778 #.  "File creation" flags is.  I raised an Aardvark to see if this
4779 #.  can be clarified in SUSv4; 10 Oct 2008.
4780 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
4781 #.  TC1 (balloted in 2013), resolved this, so that those three constants
4782 #.  are also categorized" as file status flags.
4783 #. type: Plain text
4784 #: build/C/man2/open.2:153
4785 msgid ""
4786 "In addition, zero or more file creation flags and file status flags can be "
4787 "bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, "
4788 "B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, "
4789 "B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the "
4790 "remaining flags listed below.  The distinction between these two groups of "
4791 "flags is that the file status flags can be retrieved and (in some cases)  "
4792 "modified using B<fcntl>(2).  The full list of file creation flags and file "
4793 "status flags is as follows:"
4794 msgstr ""
4795
4796 #. type: TP
4797 #: build/C/man2/open.2:153
4798 #, no-wrap
4799 msgid "B<O_APPEND>"
4800 msgstr ""
4801
4802 #.  For more background, see
4803 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
4804 #.  http://nfs.sourceforge.net/
4805 #. type: Plain text
4806 #: build/C/man2/open.2:170
4807 msgid ""
4808 "The file is opened in append mode.  Before each B<write>(2), the file offset "
4809 "is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> "
4810 "may lead to corrupted files on NFS file systems if more than one process "
4811 "appends data to a file at once.  This is because NFS does not support "
4812 "appending to a file, so the client kernel has to simulate it, which can't be "
4813 "done without a race condition."
4814 msgstr ""
4815
4816 #. type: TP
4817 #: build/C/man2/open.2:170
4818 #, no-wrap
4819 msgid "B<O_ASYNC>"
4820 msgstr ""
4821
4822 #. type: Plain text
4823 #: build/C/man2/open.2:183
4824 msgid ""
4825 "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this "
4826 "can be changed via B<fcntl>(2))  when input or output becomes possible on "
4827 "this file descriptor.  This feature is available only for terminals, "
4828 "pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See "
4829 "B<fcntl>(2)  for further details."
4830 msgstr ""
4831
4832 #. type: TP
4833 #: build/C/man2/open.2:183
4834 #, no-wrap
4835 msgid "B<O_CLOEXEC> (Since Linux 2.6.23)"
4836 msgstr ""
4837
4838 #.  This flag fixes only one form of the race condition;
4839 #.  The race can also occur with, for example, descriptors
4840 #.  returned by accept(), pipe(), etc.
4841 #. type: Plain text
4842 #: build/C/man2/open.2:208
4843 msgid ""
4844 "Enable the close-on-exec flag for the new file descriptor.  Specifying this "
4845 "flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> "
4846 "operations to set the B<FD_CLOEXEC> flag.  Additionally, use of this flag is "
4847 "essential in some multithreaded programs since using a separate B<fcntl>(2)  "
4848 "B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid "
4849 "race conditions where one thread opens a file descriptor at the same time as "
4850 "another thread does a B<fork>(2)  plus B<execve>(2)."
4851 msgstr ""
4852
4853 #. type: TP
4854 #: build/C/man2/open.2:208
4855 #, no-wrap
4856 msgid "B<O_CREAT>"
4857 msgstr ""
4858
4859 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
4860 #.  XFS (since 2.6.14).
4861 #. type: Plain text
4862 #: build/C/man2/open.2:224
4863 msgid ""
4864 "If the file does not exist it will be created.  The owner (user ID) of the "
4865 "file is set to the effective user ID of the process.  The group ownership "
4866 "(group ID) is set either to the effective group ID of the process or to the "
4867 "group ID of the parent directory (depending on file system type and mount "
4868 "options, and the mode of the parent directory, see the mount options "
4869 "I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
4870 msgstr ""
4871
4872 #. type: Plain text
4873 #: build/C/man2/open.2:247
4874 msgid ""
4875 "I<mode> specifies the permissions to use in case a new file is created.  "
4876 "This argument must be supplied when B<O_CREAT> is specified in I<flags>; if "
4877 "B<O_CREAT> is not specified, then I<mode> is ignored.  The effective "
4878 "permissions are modified by the process's I<umask> in the usual way: The "
4879 "permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this "
4880 "mode applies only to future accesses of the newly created file; the "
4881 "B<open>()  call that creates a read-only file may well return a read/write "
4882 "file descriptor."
4883 msgstr ""
4884
4885 #. type: Plain text
4886 #: build/C/man2/open.2:250
4887 msgid "The following symbolic constants are provided for I<mode>:"
4888 msgstr ""
4889
4890 #. type: TP
4891 #: build/C/man2/open.2:250
4892 #, no-wrap
4893 msgid "B<S_IRWXU>"
4894 msgstr ""
4895
4896 #. type: Plain text
4897 #: build/C/man2/open.2:253
4898 msgid "00700 user (file owner) has read, write and execute permission"
4899 msgstr ""
4900
4901 #. type: TP
4902 #: build/C/man2/open.2:253
4903 #, no-wrap
4904 msgid "B<S_IRUSR>"
4905 msgstr ""
4906
4907 #. type: Plain text
4908 #: build/C/man2/open.2:256
4909 msgid "00400 user has read permission"
4910 msgstr ""
4911
4912 #. type: TP
4913 #: build/C/man2/open.2:256
4914 #, no-wrap
4915 msgid "B<S_IWUSR>"
4916 msgstr ""
4917
4918 #. type: Plain text
4919 #: build/C/man2/open.2:259
4920 msgid "00200 user has write permission"
4921 msgstr ""
4922
4923 #. type: TP
4924 #: build/C/man2/open.2:259
4925 #, no-wrap
4926 msgid "B<S_IXUSR>"
4927 msgstr ""
4928
4929 #. type: Plain text
4930 #: build/C/man2/open.2:262
4931 msgid "00100 user has execute permission"
4932 msgstr ""
4933
4934 #. type: TP
4935 #: build/C/man2/open.2:262
4936 #, no-wrap
4937 msgid "B<S_IRWXG>"
4938 msgstr ""
4939
4940 #. type: Plain text
4941 #: build/C/man2/open.2:265
4942 msgid "00070 group has read, write and execute permission"
4943 msgstr ""
4944
4945 #. type: TP
4946 #: build/C/man2/open.2:265
4947 #, no-wrap
4948 msgid "B<S_IRGRP>"
4949 msgstr ""
4950
4951 #. type: Plain text
4952 #: build/C/man2/open.2:268
4953 msgid "00040 group has read permission"
4954 msgstr ""
4955
4956 #. type: TP
4957 #: build/C/man2/open.2:268
4958 #, no-wrap
4959 msgid "B<S_IWGRP>"
4960 msgstr ""
4961
4962 #. type: Plain text
4963 #: build/C/man2/open.2:271
4964 msgid "00020 group has write permission"
4965 msgstr ""
4966
4967 #. type: TP
4968 #: build/C/man2/open.2:271
4969 #, no-wrap
4970 msgid "B<S_IXGRP>"
4971 msgstr ""
4972
4973 #. type: Plain text
4974 #: build/C/man2/open.2:274
4975 msgid "00010 group has execute permission"
4976 msgstr ""
4977
4978 #. type: TP
4979 #: build/C/man2/open.2:274
4980 #, no-wrap
4981 msgid "B<S_IRWXO>"
4982 msgstr ""
4983
4984 #. type: Plain text
4985 #: build/C/man2/open.2:277
4986 msgid "00007 others have read, write and execute permission"
4987 msgstr ""
4988
4989 #. type: TP
4990 #: build/C/man2/open.2:277
4991 #, no-wrap
4992 msgid "B<S_IROTH>"
4993 msgstr ""
4994
4995 #. type: Plain text
4996 #: build/C/man2/open.2:280
4997 msgid "00004 others have read permission"
4998 msgstr ""
4999
5000 #. type: TP
5001 #: build/C/man2/open.2:280
5002 #, no-wrap
5003 msgid "B<S_IWOTH>"
5004 msgstr ""
5005
5006 #. type: Plain text
5007 #: build/C/man2/open.2:283
5008 msgid "00002 others have write permission"
5009 msgstr ""
5010
5011 #. type: TP
5012 #: build/C/man2/open.2:283
5013 #, no-wrap
5014 msgid "B<S_IXOTH>"
5015 msgstr ""
5016
5017 #. type: Plain text
5018 #: build/C/man2/open.2:286
5019 msgid "00001 others have execute permission"
5020 msgstr ""
5021
5022 #. type: TP
5023 #: build/C/man2/open.2:287
5024 #, no-wrap
5025 msgid "B<O_DIRECT> (Since Linux 2.4.10)"
5026 msgstr ""
5027
5028 #. type: Plain text
5029 #: build/C/man2/open.2:304
5030 msgid ""
5031 "Try to minimize cache effects of the I/O to and from this file.  In general "
5032 "this will degrade performance, but it is useful in special situations, such "
5033 "as when applications do their own caching.  File I/O is done directly "
5034 "to/from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort "
5035 "to transfer data synchronously, but does not give the guarantees of the "
5036 "B<O_SYNC> flag that data and necessary metadata are transferred.  To "
5037 "guarantee synchronous I/O, B<O_SYNC> must be used in addition to "
5038 "B<O_DIRECT>.  See NOTES below for further discussion."
5039 msgstr ""
5040
5041 #. type: Plain text
5042 #: build/C/man2/open.2:308
5043 msgid ""
5044 "A semantically similar (but deprecated) interface for block devices is "
5045 "described in B<raw>(8)."
5046 msgstr ""
5047
5048 #. type: TP
5049 #: build/C/man2/open.2:308
5050 #, no-wrap
5051 msgid "B<O_DIRECTORY>"
5052 msgstr ""
5053
5054 #.  But see the following and its replies:
5055 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
5056 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
5057 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
5058 #. type: Plain text
5059 #: build/C/man2/open.2:322
5060 msgid ""
5061 "If I<pathname> is not a directory, cause the open to fail.  This flag is "
5062 "Linux-specific, and was added in kernel version 2.1.126, to avoid "
5063 "denial-of-service problems if B<opendir>(3)  is called on a FIFO or tape "
5064 "device, but should not be used outside of the implementation of "
5065 "B<opendir>(3)."
5066 msgstr ""
5067
5068 #. type: TP
5069 #: build/C/man2/open.2:322
5070 #, no-wrap
5071 msgid "B<O_EXCL>"
5072 msgstr ""
5073
5074 #. type: Plain text
5075 #: build/C/man2/open.2:332
5076 msgid ""
5077 "Ensure that this call creates the file: if this flag is specified in "
5078 "conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  "
5079 "will fail."
5080 msgstr ""
5081
5082 #.  POSIX.1-2001 explicitly requires this behavior.
5083 #. type: Plain text
5084 #: build/C/man2/open.2:340
5085 msgid ""
5086 "When these two flags are specified, symbolic links are not followed: if "
5087 "I<pathname> is a symbolic link, then B<open>()  fails regardless of where "
5088 "the symbolic link points to."
5089 msgstr ""
5090
5091 #. type: Plain text
5092 #: build/C/man2/open.2:356
5093 msgid ""
5094 "In general, the behavior of B<O_EXCL> is undefined if it is used without "
5095 "B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can "
5096 "be used without B<O_CREAT> if I<pathname> refers to a block device.  If the "
5097 "block device is in use by the system (e.g., mounted), B<open>()  fails with "
5098 "the error B<EBUSY>."
5099 msgstr ""
5100
5101 #. type: Plain text
5102 #: build/C/man2/open.2:378
5103 msgid ""
5104 "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 "
5105 "or later.  In NFS environments where B<O_EXCL> support is not provided, "
5106 "programs that rely on it for performing locking tasks will contain a race "
5107 "condition.  Portable programs that want to perform atomic file locking using "
5108 "a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can "
5109 "create a unique file on the same file system (e.g., incorporating hostname "
5110 "and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>(2)  "
5111 "returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the unique "
5112 "file to check if its link count has increased to 2, in which case the lock "
5113 "is also successful."
5114 msgstr ""
5115
5116 #. type: TP
5117 #: build/C/man2/open.2:378
5118 #, no-wrap
5119 msgid "B<O_LARGEFILE>"
5120 msgstr ""
5121
5122 #. type: Plain text
5123 #: build/C/man2/open.2:400
5124 msgid ""
5125 "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can "
5126 "be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> "
5127 "macro must be defined (before including I<any> header files)  in order to "
5128 "obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro "
5129 "to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of "
5130 "accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
5131 msgstr ""
5132
5133 #. type: TP
5134 #: build/C/man2/open.2:400
5135 #, no-wrap
5136 msgid "B<O_NOATIME> (Since Linux 2.6.8)"
5137 msgstr ""
5138
5139 #.  The O_NOATIME flag also affects the treatment of st_atime
5140 #.  by mmap() and readdir(2), MTK, Dec 04.
5141 #. type: Plain text
5142 #: build/C/man2/open.2:413
5143 msgid ""
5144 "Do not update the file last access time (I<st_atime> in the inode)  when the "
5145 "file is B<read>(2).  This flag is intended for use by indexing or backup "
5146 "programs, where its use can significantly reduce the amount of disk "
5147 "activity.  This flag may not be effective on all file systems.  One example "
5148 "is NFS, where the server maintains the access time."
5149 msgstr ""
5150
5151 #. type: TP
5152 #: build/C/man2/open.2:413
5153 #, no-wrap
5154 msgid "B<O_NOCTTY>"
5155 msgstr ""
5156
5157 #. type: Plain text
5158 #: build/C/man2/open.2:421
5159 msgid ""
5160 "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not "
5161 "become the process's controlling terminal even if the process does not have "
5162 "one."
5163 msgstr ""
5164
5165 #. type: TP
5166 #: build/C/man2/open.2:421
5167 #, no-wrap
5168 msgid "B<O_NOFOLLOW>"
5169 msgstr ""
5170
5171 #.  The headers from glibc 2.0.100 and later include a
5172 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
5173 #.  used\fP.
5174 #. type: Plain text
5175 #: build/C/man2/open.2:430
5176 msgid ""
5177 "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD "
5178 "extension, which was added to Linux in version 2.1.126.  Symbolic links in "
5179 "earlier components of the pathname will still be followed."
5180 msgstr ""
5181
5182 #. type: TP
5183 #: build/C/man2/open.2:430
5184 #, no-wrap
5185 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
5186 msgstr ""
5187
5188 #. type: Plain text
5189 #: build/C/man2/open.2:443
5190 msgid ""
5191 "When possible, the file is opened in nonblocking mode.  Neither the "
5192 "B<open>()  nor any subsequent operations on the file descriptor which is "
5193 "returned will cause the calling process to wait.  For the handling of FIFOs "
5194 "(named pipes), see also B<fifo>(7).  For a discussion of the effect of "
5195 "B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, "
5196 "see B<fcntl>(2)."
5197 msgstr ""
5198
5199 #. type: TP
5200 #: build/C/man2/open.2:443
5201 #, no-wrap
5202 msgid "B<O_SYNC>"
5203 msgstr ""
5204
5205 #. type: Plain text
5206 #: build/C/man2/open.2:451
5207 msgid ""
5208 "The file is opened for synchronous I/O.  Any B<write>(2)s on the resulting "
5209 "file descriptor will block the calling process until the data has been "
5210 "physically written to the underlying hardware.  I<But see NOTES below>."
5211 msgstr ""
5212
5213 #. type: TP
5214 #: build/C/man2/open.2:451
5215 #, no-wrap
5216 msgid "B<O_TRUNC>"
5217 msgstr ""
5218
5219 #. type: Plain text
5220 #: build/C/man2/open.2:465
5221 msgid ""
5222 "If the file already exists and is a regular file and the open mode allows "
5223 "writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length "
5224 "0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is "
5225 "ignored.  Otherwise the effect of B<O_TRUNC> is unspecified."
5226 msgstr ""
5227
5228 #. type: Plain text
5229 #: build/C/man2/open.2:469
5230 msgid ""
5231 "Some of these optional flags can be altered using B<fcntl>(2)  after the "
5232 "file has been opened."
5233 msgstr ""
5234
5235 #. type: Plain text
5236 #: build/C/man2/open.2:477
5237 msgid ""
5238 "B<creat>()  is equivalent to B<open>()  with I<flags> equal to "
5239 "B<O_CREAT|O_WRONLY|O_TRUNC>."
5240 msgstr ""
5241
5242 #. type: Plain text
5243 #: build/C/man2/open.2:485
5244 msgid ""
5245 "B<open>()  and B<creat>()  return the new file descriptor, or -1 if an error "
5246 "occurred (in which case, I<errno> is set appropriately)."
5247 msgstr ""
5248
5249 #. type: Plain text
5250 #: build/C/man2/open.2:495
5251 msgid ""
5252 "The requested access to the file is not allowed, or search permission is "
5253 "denied for one of the directories in the path prefix of I<pathname>, or the "
5254 "file did not exist yet and write access to the parent directory is not "
5255 "allowed.  (See also B<path_resolution>(7).)"
5256 msgstr ""
5257
5258 #. type: Plain text
5259 #: build/C/man2/open.2:501
5260 msgid ""
5261 "Where B<O_CREAT> is specified, the file does not exist, and the user's quota "
5262 "of disk blocks or inodes on the file system has been exhausted."
5263 msgstr ""
5264
5265 #. type: Plain text
5266 #: build/C/man2/open.2:507
5267 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
5268 msgstr ""
5269
5270 #. type: Plain text
5271 #: build/C/man2/open.2:511 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:84
5272 msgid "I<pathname> points outside your accessible address space."
5273 msgstr ""
5274
5275 #. type: TP
5276 #: build/C/man2/open.2:511 build/C/man2/write.2:145
5277 #, no-wrap
5278 msgid "B<EFBIG>"
5279 msgstr ""
5280
5281 #. type: Plain text
5282 #: build/C/man2/open.2:515
5283 msgid "See B<EOVERFLOW>."
5284 msgstr ""
5285
5286 #. type: TP
5287 #: build/C/man2/open.2:515 build/C/man2/read.2:122 build/C/man3/scanf.3:561 build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
5288 #, no-wrap
5289 msgid "B<EINTR>"
5290 msgstr ""
5291
5292 #. type: Plain text
5293 #: build/C/man2/open.2:522
5294 msgid ""
5295 "While blocked waiting to complete an open of a slow device (e.g., a FIFO; "
5296 "see B<fifo>(7)), the call was interrupted by a signal handler; see "
5297 "B<signal>(7)."
5298 msgstr ""
5299
5300 #. type: TP
5301 #: build/C/man2/open.2:522 build/C/man2/read.2:158 build/C/man2/rename.2:143 build/C/man2/unlink.2:87
5302 #, no-wrap
5303 msgid "B<EISDIR>"
5304 msgstr ""
5305
5306 #. type: Plain text
5307 #: build/C/man2/open.2:531
5308 msgid ""
5309 "I<pathname> refers to a directory and the access requested involved writing "
5310 "(that is, B<O_WRONLY> or B<O_RDWR> is set)."
5311 msgstr ""
5312
5313 #. type: Plain text
5314 #: build/C/man2/open.2:538
5315 msgid ""
5316 "Too many symbolic links were encountered in resolving I<pathname>, or "
5317 "B<O_NOFOLLOW> was specified but I<pathname> was a symbolic link."
5318 msgstr ""
5319
5320 #. type: TP
5321 #: build/C/man2/open.2:538 build/C/man2/pipe.2:107 build/C/man3/tmpfile.3:66
5322 #, no-wrap
5323 msgid "B<EMFILE>"
5324 msgstr ""
5325
5326 #. type: Plain text
5327 #: build/C/man2/open.2:541
5328 msgid "The process already has the maximum number of files open."
5329 msgstr ""
5330
5331 #. type: Plain text
5332 #: build/C/man2/open.2:545 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:99
5333 msgid "I<pathname> was too long."
5334 msgstr ""
5335
5336 #. type: TP
5337 #: build/C/man2/open.2:545 build/C/man2/pipe.2:110 build/C/man3/tmpfile.3:69
5338 #, no-wrap
5339 msgid "B<ENFILE>"
5340 msgstr ""
5341
5342 #. type: Plain text
5343 #: build/C/man2/open.2:548 build/C/man2/pipe.2:113
5344 msgid "The system limit on the total number of open files has been reached."
5345 msgstr ""
5346
5347 #. type: TP
5348 #: build/C/man2/open.2:548
5349 #, no-wrap
5350 msgid "B<ENODEV>"
5351 msgstr ""
5352
5353 #. type: Plain text
5354 #: build/C/man2/open.2:555
5355 msgid ""
5356 "I<pathname> refers to a device special file and no corresponding device "
5357 "exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be "
5358 "returned.)"
5359 msgstr ""
5360
5361 #. type: Plain text
5362 #: build/C/man2/open.2:562
5363 msgid ""
5364 "B<O_CREAT> is not set and the named file does not exist.  Or, a directory "
5365 "component in I<pathname> does not exist or is a dangling symbolic link."
5366 msgstr ""
5367
5368 #. type: Plain text
5369 #: build/C/man2/open.2:571
5370 msgid ""
5371 "I<pathname> was to be created but the device containing I<pathname> has no "
5372 "room for the new file."
5373 msgstr ""
5374
5375 #. type: Plain text
5376 #: build/C/man2/open.2:578
5377 msgid ""
5378 "A component used as a directory in I<pathname> is not, in fact, a directory, "
5379 "or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
5380 msgstr ""
5381
5382 #. type: Plain text
5383 #: build/C/man2/open.2:584
5384 msgid ""
5385 "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO and no process "
5386 "has the file open for reading.  Or, the file is a device special file and no "
5387 "corresponding device exists."
5388 msgstr ""
5389
5390 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
5391 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
5392 #.  Reported 2006-10-03
5393 #. type: Plain text
5394 #: build/C/man2/open.2:604
5395 msgid ""
5396 "I<pathname> refers to a regular file that is too large to be opened.  The "
5397 "usual scenario here is that an application compiled on a 32-bit platform "
5398 "without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds "
5399 "I<(2E<lt>E<lt>31)-1> bits; see also B<O_LARGEFILE> above.  This is the error "
5400 "specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error "
5401 "B<EFBIG> for this case."
5402 msgstr ""
5403
5404 #.  Strictly speaking, it's the file system UID... (MTK)
5405 #. type: Plain text
5406 #: build/C/man2/open.2:612
5407 msgid ""
5408 "The B<O_NOATIME> flag was specified, but the effective user ID of the caller "
5409 "did not match the owner of the file and the caller was not privileged "
5410 "(B<CAP_FOWNER>)."
5411 msgstr ""
5412
5413 #. type: Plain text
5414 #: build/C/man2/open.2:617
5415 msgid ""
5416 "I<pathname> refers to a file on a read-only file system and write access was "
5417 "requested."
5418 msgstr ""
5419
5420 #. type: TP
5421 #: build/C/man2/open.2:617
5422 #, no-wrap
5423 msgid "B<ETXTBSY>"
5424 msgstr ""
5425
5426 #. type: Plain text
5427 #: build/C/man2/open.2:622
5428 msgid ""
5429 "I<pathname> refers to an executable image which is currently being executed "
5430 "and write access was requested."
5431 msgstr ""
5432
5433 #. type: TP
5434 #: build/C/man2/open.2:622
5435 #, no-wrap
5436 msgid "B<EWOULDBLOCK>"
5437 msgstr ""
5438
5439 #. type: Plain text
5440 #: build/C/man2/open.2:629
5441 msgid ""
5442 "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on "
5443 "the file (see B<fcntl>(2))."
5444 msgstr ""
5445
5446 #. type: Plain text
5447 #: build/C/man2/open.2:642
5448 msgid ""
5449 "SVr4, 4.3BSD, POSIX.1-2001.  The B<O_DIRECTORY>, B<O_NOATIME>, and "
5450 "B<O_NOFOLLOW> flags are Linux-specific, and one may need to define "
5451 "B<_GNU_SOURCE> (before including I<any> header files)  to obtain their "
5452 "definitions."
5453 msgstr ""
5454
5455 #. type: Plain text
5456 #: build/C/man2/open.2:647
5457 msgid ""
5458 "The B<O_CLOEXEC> flag is not specified in POSIX.1-2001, but is specified in "
5459 "POSIX.1-2008."
5460 msgstr ""
5461
5462 #. type: Plain text
5463 #: build/C/man2/open.2:655
5464 msgid ""
5465 "B<O_DIRECT> is not specified in POSIX; one has to define B<_GNU_SOURCE> "
5466 "(before including I<any> header files)  to get its definition."
5467 msgstr ""
5468
5469 #. type: Plain text
5470 #: build/C/man2/open.2:663
5471 msgid ""
5472 "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but "
5473 "does not necessarily have the intention to read or write.  This is typically "
5474 "used to open devices in order to get a file descriptor for use with "
5475 "B<ioctl>(2)."
5476 msgstr ""
5477
5478 #.  See for example util-linux's disk-utils/setfdprm.c
5479 #.  For some background on access mode 3, see
5480 #.  http://thread.gmane.org/gmane.linux.kernel/653123
5481 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
5482 #.  LKML, 12 Mar 2008
5483 #. type: Plain text
5484 #: build/C/man2/open.2:692
5485 msgid ""
5486 "Unlike the other values that can be specified in I<flags>, the I<access "
5487 "mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR>, do not specify "
5488 "individual bits.  Rather, they define the low order two bits of I<flags>, "
5489 "and are defined respectively as 0, 1, and 2.  In other words, the "
5490 "combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does "
5491 "not have the same meaning as B<O_RDWR>.  Linux reserves the special, "
5492 "nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read "
5493 "and write permission on the file and return a descriptor that can't be used "
5494 "for reading or writing.  This nonstandard access mode is used by some Linux "
5495 "drivers to return a descriptor that is to be used only for device-specific "
5496 "B<ioctl>(2)  operations."
5497 msgstr ""
5498
5499 #.  Linux 2.0, 2.5: truncate
5500 #.  Solaris 5.7, 5.8: truncate
5501 #.  Irix 6.5: truncate
5502 #.  Tru64 5.1B: truncate
5503 #.  HP-UX 11.22: truncate
5504 #.  FreeBSD 4.7: truncate
5505 #. type: Plain text
5506 #: build/C/man2/open.2:703
5507 msgid ""
5508 "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among "
5509 "implementations.  On many systems the file is actually truncated."
5510 msgstr ""
5511
5512 #. type: Plain text
5513 #: build/C/man2/open.2:707
5514 msgid ""
5515 "There are many infelicities in the protocol underlying NFS, affecting "
5516 "amongst others B<O_SYNC> and B<O_NDELAY>."
5517 msgstr ""
5518
5519 #. type: Plain text
5520 #: build/C/man2/open.2:729
5521 msgid ""
5522 "POSIX provides for three different variants of synchronized I/O, "
5523 "corresponding to the flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC>.  Currently "
5524 "(2.6.31), Linux implements only B<O_SYNC>, but glibc maps B<O_DSYNC> and "
5525 "B<O_RSYNC> to the same numerical value as B<O_SYNC>.  Most Linux file "
5526 "systems don't actually implement the POSIX B<O_SYNC> semantics, which "
5527 "require all metadata updates of a write to be on disk on returning to user "
5528 "space, but only the B<O_DSYNC> semantics, which require only actual file "
5529 "data and metadata necessary to retrieve it to be on disk by the time the "
5530 "system call returns."
5531 msgstr ""
5532
5533 #. type: Plain text
5534 #: build/C/man2/open.2:737
5535 msgid ""
5536 "Note that B<open>()  can open device special files, but B<creat>()  cannot "
5537 "create them; use B<mknod>(2)  instead."
5538 msgstr ""
5539
5540 #. type: Plain text
5541 #: build/C/man2/open.2:750
5542 msgid ""
5543 "On NFS file systems with UID mapping enabled, B<open>()  may return a file "
5544 "descriptor but, for example, B<read>(2)  requests are denied with "
5545 "B<EACCES>.  This is because the client performs B<open>()  by checking the "
5546 "permissions, but UID mapping is performed by the server upon read and write "
5547 "requests."
5548 msgstr ""
5549
5550 #. type: Plain text
5551 #: build/C/man2/open.2:769
5552 msgid ""
5553 "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> "
5554 "fields (respectively, time of last access, time of last status change, and "
5555 "time of last modification; see B<stat>(2))  are set to the current time, and "
5556 "so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  "
5557 "Otherwise, if the file is modified because of the B<O_TRUNC> flag, its "
5558 "st_ctime and st_mtime fields are set to the current time."
5559 msgstr ""
5560
5561 #. type: SS
5562 #: build/C/man2/open.2:769
5563 #, no-wrap
5564 msgid "O_DIRECT"
5565 msgstr ""
5566
5567 #. type: Plain text
5568 #: build/C/man2/open.2:786
5569 msgid ""
5570 "The B<O_DIRECT> flag may impose alignment restrictions on the length and "
5571 "address of user-space buffers and the file offset of I/Os.  In Linux "
5572 "alignment restrictions vary by file system and kernel version and might be "
5573 "absent entirely.  However there is currently no file system-independent "
5574 "interface for an application to discover these restrictions for a given file "
5575 "or file system.  Some file systems provide their own interfaces for doing "
5576 "so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
5577 msgstr ""
5578
5579 #. type: Plain text
5580 #: build/C/man2/open.2:791
5581 msgid ""
5582 "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and "
5583 "the file offset must all be multiples of the logical block size of the file "
5584 "system.  Under Linux 2.6, alignment to 512-byte boundaries suffices."
5585 msgstr ""
5586
5587 #. type: Plain text
5588 #: build/C/man2/open.2:825
5589 msgid ""
5590 "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  "
5591 "system call, if the memory buffer is a private mapping (i.e., any mapping "
5592 "created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory "
5593 "allocated on the heap and statically allocated buffers).  Any such I/Os, "
5594 "whether submitted via an asynchronous I/O interface or from another thread "
5595 "in the process, should be completed before B<fork>(2)  is called.  Failure "
5596 "to do so can result in data corruption and undefined behavior in parent and "
5597 "child processes.  This restriction does not apply when the memory buffer for "
5598 "the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the "
5599 "B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer "
5600 "has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it "
5601 "will not be available to the child after B<fork>(2)."
5602 msgstr ""
5603
5604 #. type: Plain text
5605 #: build/C/man2/open.2:835
5606 msgid ""
5607 "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment "
5608 "restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  "
5609 "call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a "
5610 "flag of the same name, but without alignment restrictions."
5611 msgstr ""
5612
5613 #. type: Plain text
5614 #: build/C/man2/open.2:844
5615 msgid ""
5616 "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older "
5617 "Linux kernels simply ignore this flag.  Some file systems may not implement "
5618 "the flag and B<open>()  will fail with B<EINVAL> if it is used."
5619 msgstr ""
5620
5621 #. type: Plain text
5622 #: build/C/man2/open.2:855
5623 msgid ""
5624 "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same "
5625 "file, and especially to overlapping byte regions in the same file.  Even "
5626 "when the file system correctly handles the coherency issues in this "
5627 "situation, overall I/O throughput is likely to be slower than using either "
5628 "mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files "
5629 "with direct I/O to the same files."
5630 msgstr ""
5631
5632 #. type: Plain text
5633 #: build/C/man2/open.2:877
5634 msgid ""
5635 "The behaviour of B<O_DIRECT> with NFS will differ from local file systems.  "
5636 "Older kernels, or kernels configured in certain ways, may not support this "
5637 "combination.  The NFS protocol does not support passing the flag to the "
5638 "server, so B<O_DIRECT> I/O will bypass the page cache only on the client; "
5639 "the server may still cache the I/O.  The client asks the server to make the "
5640 "I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some "
5641 "servers will perform poorly under these circumstances, especially if the I/O "
5642 "size is small.  Some servers may also be configured to lie to clients about "
5643 "the I/O having reached stable storage; this will avoid the performance "
5644 "penalty at some risk to data integrity in the event of server power "
5645 "failure.  The Linux NFS client places no alignment restrictions on "
5646 "B<O_DIRECT> I/O."
5647 msgstr ""
5648
5649 #. type: Plain text
5650 #: build/C/man2/open.2:884
5651 msgid ""
5652 "In summary, B<O_DIRECT> is a potentially powerful tool that should be used "
5653 "with caution.  It is recommended that applications treat use of B<O_DIRECT> "
5654 "as a performance option which is disabled by default."
5655 msgstr ""
5656
5657 #. type: Plain text
5658 #: build/C/man2/open.2:889
5659 msgid ""
5660 "\"The thing that has always disturbed me about O_DIRECT is that the whole "
5661 "interface is just stupid, and was probably designed by a deranged monkey on "
5662 "some serious mind-controlling substances.\"\\(emLinus"
5663 msgstr ""
5664
5665 #.  FIXME . Check bugzilla report on open(O_ASYNC)
5666 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
5667 #. type: Plain text
5668 #: build/C/man2/open.2:901
5669 msgid ""
5670 "Currently, it is not possible to enable signal-driven I/O by specifying "
5671 "B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
5672 msgstr ""
5673
5674 #. type: Plain text
5675 #: build/C/man2/open.2:923
5676 msgid ""
5677 "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), "
5678 "B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<openat>(2), B<read>(2), "
5679 "B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), "
5680 "B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
5681 msgstr ""
5682
5683 #. type: TH
5684 #: build/C/man3/perror.3:31
5685 #, no-wrap
5686 msgid "PERROR"
5687 msgstr ""
5688
5689 #. type: TH
5690 #: build/C/man3/perror.3:31
5691 #, no-wrap
5692 msgid "2012-04-17"
5693 msgstr ""
5694
5695 #. type: Plain text
5696 #: build/C/man3/perror.3:34
5697 msgid "perror - print a system error message"
5698 msgstr ""
5699
5700 #. type: Plain text
5701 #: build/C/man3/perror.3:38
5702 msgid "B<void perror(const char *>I<s>B<);>"
5703 msgstr ""
5704
5705 #. type: Plain text
5706 #: build/C/man3/perror.3:40
5707 msgid "B<#include E<lt>errno.hE<gt>>"
5708 msgstr ""
5709
5710 #. type: Plain text
5711 #: build/C/man3/perror.3:42
5712 msgid "B<const char *>I<sys_errlist>B<[];>"
5713 msgstr ""
5714
5715 #. type: Plain text
5716 #: build/C/man3/perror.3:44
5717 msgid "B<int >I<sys_nerr>B<;>"
5718 msgstr ""
5719
5720 #. type: Plain text
5721 #: build/C/man3/perror.3:46
5722 msgid "B<int >I<errno>B<;>"
5723 msgstr ""
5724
5725 #. type: Plain text
5726 #: build/C/man3/perror.3:55
5727 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
5728 msgstr ""
5729
5730 #. type: Plain text
5731 #: build/C/man3/perror.3:68
5732 msgid ""
5733 "The routine B<perror>()  produces a message on the standard error output, "
5734 "describing the last error encountered during a call to a system or library "
5735 "function.  First (if I<s> is not NULL and I<*s> is not a null byte "
5736 "(\\(aq\\e0\\(aq)) the argument string I<s> is printed, followed by a colon "
5737 "and a blank.  Then the message and a new-line."
5738 msgstr ""
5739
5740 #. type: Plain text
5741 #: build/C/man3/perror.3:76
5742 msgid ""
5743 "To be of most use, the argument string should include the name of the "
5744 "function that incurred the error.  The error number is taken from the "
5745 "external variable I<errno>, which is set when errors occur but not cleared "
5746 "when successful calls are made."
5747 msgstr ""
5748
5749 #. type: Plain text
5750 #: build/C/man3/perror.3:90
5751 msgid ""
5752 "The global error list I<sys_errlist>[] indexed by I<errno> can be used to "
5753 "obtain the error message without the newline.  The largest message number "
5754 "provided in the table is I<sys_nerr>-1.  Be careful when directly accessing "
5755 "this list because new error values may not have been added to "
5756 "I<sys_errlist>[].  The use of I<sys_errlist>[] is nowadays deprecated."
5757 msgstr ""
5758
5759 #. type: Plain text
5760 #: build/C/man3/perror.3:111
5761 msgid ""
5762 "When a system call fails, it usually returns -1 and sets the variable "
5763 "I<errno> to a value describing what went wrong.  (These values can be found "
5764 "in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function "
5765 "B<perror>()  serves to translate this error code into human-readable form.  "
5766 "Note that I<errno> is undefined after a successful library call: this call "
5767 "may well change this variable, even though it succeeds, for example because "
5768 "it internally used some other library function that failed.  Thus, if a "
5769 "failing call is not immediately followed by a call to B<perror>(), the value "
5770 "of I<errno> should be saved."
5771 msgstr ""
5772
5773 #. type: Plain text
5774 #: build/C/man3/perror.3:124
5775 msgid ""
5776 "The function B<perror>()  and the external I<errno> (see B<errno>(3))  "
5777 "conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and "
5778 "I<sys_errlist> conform to BSD."
5779 msgstr ""
5780
5781 #.  and only when _BSD_SOURCE is defined.
5782 #.  When
5783 #.  .B _GNU_SOURCE
5784 #.  is defined, the symbols
5785 #.  .I _sys_nerr
5786 #.  and
5787 #.  .I _sys_errlist
5788 #.  are provided.
5789 #. type: Plain text
5790 #: build/C/man3/perror.3:139
5791 msgid ""
5792 "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in "
5793 "I<E<lt>stdio.hE<gt>>."
5794 msgstr ""
5795
5796 #. type: Plain text
5797 #: build/C/man3/perror.3:144
5798 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
5799 msgstr ""
5800
5801 #. type: TH
5802 #: build/C/man2/pipe.2:36
5803 #, no-wrap
5804 msgid "PIPE"
5805 msgstr ""
5806
5807 #. type: TH
5808 #: build/C/man2/pipe.2:36
5809 #, no-wrap
5810 msgid "2012-02-14"
5811 msgstr ""
5812
5813 #. type: Plain text
5814 #: build/C/man2/pipe.2:39
5815 msgid "pipe, pipe2 - create pipe"
5816 msgstr ""
5817
5818 #. type: Plain text
5819 #: build/C/man2/pipe.2:42 build/C/man2/read.2:41
5820 #, no-wrap
5821 msgid "B<#include E<lt>unistd.hE<gt>>\n"
5822 msgstr ""
5823
5824 #. type: Plain text
5825 #: build/C/man2/pipe.2:44
5826 #, no-wrap
5827 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
5828 msgstr ""
5829
5830 #. type: Plain text
5831 #: build/C/man2/pipe.2:48
5832 #, no-wrap
5833 msgid ""
5834 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
5835 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant "
5836 "definitions */\n"
5837 "B<#include E<lt>unistd.hE<gt>>\n"
5838 msgstr ""
5839
5840 #. type: Plain text
5841 #: build/C/man2/pipe.2:50
5842 #, no-wrap
5843 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
5844 msgstr ""
5845
5846 #. type: Plain text
5847 #: build/C/man2/pipe.2:66
5848 msgid ""
5849 "B<pipe>()  creates a pipe, a unidirectional data channel that can be used "
5850 "for interprocess communication.  The array I<pipefd> is used to return two "
5851 "file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to "
5852 "the read end of the pipe.  I<pipefd[1]> refers to the write end of the "
5853 "pipe.  Data written to the write end of the pipe is buffered by the kernel "
5854 "until it is read from the read end of the pipe.  For further details, see "
5855 "B<pipe>(7)."
5856 msgstr ""
5857
5858 #. type: Plain text
5859 #: build/C/man2/pipe.2:76
5860 msgid ""
5861 "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following "
5862 "values can be bitwise ORed in I<flags> to obtain different behavior:"
5863 msgstr ""
5864
5865 #. type: TP
5866 #: build/C/man2/pipe.2:76
5867 #, no-wrap
5868 msgid "B<O_NONBLOCK>"
5869 msgstr ""
5870
5871 #. type: Plain text
5872 #: build/C/man2/pipe.2:84
5873 msgid ""
5874 "Set the B<O_NONBLOCK> file status flag on the two new open file "
5875 "descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve "
5876 "the same result."
5877 msgstr ""
5878
5879 #. type: TP
5880 #: build/C/man2/pipe.2:84
5881 #, no-wrap
5882 msgid "B<O_CLOEXEC>"
5883 msgstr ""
5884
5885 #. type: Plain text
5886 #: build/C/man2/pipe.2:92
5887 msgid ""
5888 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file "
5889 "descriptors.  See the description of the same flag in B<open>(2)  for "
5890 "reasons why this may be useful."
5891 msgstr ""
5892
5893 #. type: Plain text
5894 #: build/C/man2/pipe.2:102
5895 msgid "I<pipefd> is not valid."
5896 msgstr ""
5897
5898 #. type: Plain text
5899 #: build/C/man2/pipe.2:107
5900 msgid "(B<pipe2>())  Invalid value in I<flags>."
5901 msgstr ""
5902
5903 #. type: Plain text
5904 #: build/C/man2/pipe.2:110
5905 msgid "Too many file descriptors are in use by the process."
5906 msgstr ""
5907
5908 #. type: Plain text
5909 #: build/C/man2/pipe.2:118
5910 msgid ""
5911 "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available "
5912 "starting with version 2.9."
5913 msgstr ""
5914
5915 #. type: Plain text
5916 #: build/C/man2/pipe.2:121
5917 msgid "B<pipe>(): POSIX.1-2001."
5918 msgstr ""
5919
5920 #. type: Plain text
5921 #: build/C/man2/pipe.2:124
5922 msgid "B<pipe2>()  is Linux-specific."
5923 msgstr ""
5924
5925 #.  fork.2 refers to this example program.
5926 #. type: Plain text
5927 #: build/C/man2/pipe.2:140
5928 msgid ""
5929 "The following program creates a pipe, and then B<fork>(2)s to create a child "
5930 "process; the child inherits a duplicate set of file descriptors that refer "
5931 "to the same pipe.  After the B<fork>(2), each process closes the descriptors "
5932 "that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes "
5933 "the string contained in the program's command-line argument to the pipe, and "
5934 "the child reads this string a byte at a time from the pipe and echoes it on "
5935 "standard output."
5936 msgstr ""
5937
5938 #. type: Plain text
5939 #: build/C/man2/pipe.2:147
5940 #, no-wrap
5941 msgid ""
5942 "#include E<lt>sys/wait.hE<gt>\n"
5943 "#include E<lt>stdio.hE<gt>\n"
5944 "#include E<lt>stdlib.hE<gt>\n"
5945 "#include E<lt>unistd.hE<gt>\n"
5946 "#include E<lt>string.hE<gt>\n"
5947 msgstr ""
5948
5949 #. type: Plain text
5950 #: build/C/man2/pipe.2:154
5951 #, no-wrap
5952 msgid ""
5953 "int\n"
5954 "main(int argc, char *argv[])\n"
5955 "{\n"
5956 "    int pipefd[2];\n"
5957 "    pid_t cpid;\n"
5958 "    char buf;\n"
5959 msgstr ""
5960
5961 #. type: Plain text
5962 #: build/C/man2/pipe.2:159
5963 #, no-wrap
5964 msgid ""
5965 "    if (argc != 2) {\n"
5966 "\tfprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
5967 "\texit(EXIT_FAILURE);\n"
5968 "    }\n"
5969 msgstr ""
5970
5971 #. type: Plain text
5972 #: build/C/man2/pipe.2:164
5973 #, no-wrap
5974 msgid ""
5975 "    if (pipe(pipefd) == -1) {\n"
5976 "        perror(\"pipe\");\n"
5977 "        exit(EXIT_FAILURE);\n"
5978 "    }\n"
5979 msgstr ""
5980
5981 #. type: Plain text
5982 #: build/C/man2/pipe.2:170
5983 #, no-wrap
5984 msgid ""
5985 "    cpid = fork();\n"
5986 "    if (cpid == -1) {\n"
5987 "        perror(\"fork\");\n"
5988 "        exit(EXIT_FAILURE);\n"
5989 "    }\n"
5990 msgstr ""
5991
5992 #. type: Plain text
5993 #: build/C/man2/pipe.2:173
5994 #, no-wrap
5995 msgid ""
5996 "    if (cpid == 0) {    /* Child reads from pipe */\n"
5997 "        close(pipefd[1]);          /* Close unused write end */\n"
5998 msgstr ""
5999
6000 #. type: Plain text
6001 #: build/C/man2/pipe.2:176
6002 #, no-wrap
6003 msgid ""
6004 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
6005 "            write(STDOUT_FILENO, &buf, 1);\n"
6006 msgstr ""
6007
6008 #. type: Plain text
6009 #: build/C/man2/pipe.2:180
6010 #, no-wrap
6011 msgid ""
6012 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
6013 "        close(pipefd[0]);\n"
6014 "        _exit(EXIT_SUCCESS);\n"
6015 msgstr ""
6016
6017 #. type: Plain text
6018 #: build/C/man2/pipe.2:189
6019 #, no-wrap
6020 msgid ""
6021 "    } else {            /* Parent writes argv[1] to pipe */\n"
6022 "        close(pipefd[0]);          /* Close unused read end */\n"
6023 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
6024 "        close(pipefd[1]);          /* Reader will see EOF */\n"
6025 "        wait(NULL);                /* Wait for child */\n"
6026 "        exit(EXIT_SUCCESS);\n"
6027 "    }\n"
6028 "}\n"
6029 msgstr ""
6030
6031 #. type: Plain text
6032 #: build/C/man2/pipe.2:197
6033 msgid ""
6034 "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), "
6035 "B<pipe>(7)"
6036 msgstr ""
6037
6038 #. type: TH
6039 #: build/C/man3/popen.3:40
6040 #, no-wrap
6041 msgid "POPEN"
6042 msgstr ""
6043
6044 #. type: Plain text
6045 #: build/C/man3/popen.3:43
6046 msgid "popen, pclose - pipe stream to or from a process"
6047 msgstr ""
6048
6049 #. type: Plain text
6050 #: build/C/man3/popen.3:48
6051 #, no-wrap
6052 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
6053 msgstr ""
6054
6055 #. type: Plain text
6056 #: build/C/man3/popen.3:50
6057 #, no-wrap
6058 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
6059 msgstr ""
6060
6061 #. type: Plain text
6062 #: build/C/man3/popen.3:60
6063 msgid "B<popen>(), B<pclose>():"
6064 msgstr ""
6065
6066 #. type: Plain text
6067 #: build/C/man3/popen.3:62
6068 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
6069 msgstr ""
6070
6071 #. type: Plain text
6072 #: build/C/man3/popen.3:73
6073 msgid ""
6074 "The B<popen>()  function opens a process by creating a pipe, forking, and "
6075 "invoking the shell.  Since a pipe is by definition unidirectional, the "
6076 "I<type> argument may specify only reading or writing, not both; the "
6077 "resulting stream is correspondingly read-only or write-only."
6078 msgstr ""
6079
6080 #. type: Plain text
6081 #: build/C/man3/popen.3:97
6082 msgid ""
6083 "The I<command> argument is a pointer to a null-terminated string containing "
6084 "a shell command line.  This command is passed to I</bin/sh> using the B<-c> "
6085 "flag; interpretation, if any, is performed by the shell.  The I<type> "
6086 "argument is a pointer to a null-terminated string which must contain either "
6087 "the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  "
6088 "Since glibc 2.9, this argument can additionally include the letter "
6089 "\\(aqe\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set "
6090 "on the underlying file descriptor; see the description of the B<O_CLOEXEC> "
6091 "flag in B<open>(2)  for reasons why this may be useful."
6092 msgstr ""
6093
6094 #. type: Plain text
6095 #: build/C/man3/popen.3:113
6096 msgid ""
6097 "The return value from B<popen>()  is a normal standard I/O stream in all "
6098 "respects save that it must be closed with B<pclose>()  rather than "
6099 "B<fclose>(3).  Writing to such a stream writes to the standard input of the "
6100 "command; the command's standard output is the same as that of the process "
6101 "that called B<popen>(), unless this is altered by the command itself.  "
6102 "Conversely, reading from a \"popened\" stream reads the command's standard "
6103 "output, and the command's standard input is the same as that of the process "
6104 "that called B<popen>()."
6105 msgstr ""
6106
6107 #. type: Plain text
6108 #: build/C/man3/popen.3:117
6109 msgid "Note that output B<popen>()  streams are fully buffered by default."
6110 msgstr ""
6111
6112 #. type: Plain text
6113 #: build/C/man3/popen.3:123
6114 msgid ""
6115 "The B<pclose>()  function waits for the associated process to terminate and "
6116 "returns the exit status of the command as returned by B<wait4>(2)."
6117 msgstr ""
6118
6119 #. type: Plain text
6120 #: build/C/man3/popen.3:131
6121 msgid ""
6122 "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  "
6123 "calls fail, or if it cannot allocate memory."
6124 msgstr ""
6125
6126 #.  These conditions actually give undefined results, so I commented
6127 #.  them out.
6128 #.  .I stream
6129 #.  is not associated with a "popen()ed" command, if
6130 #. .I stream
6131 #.  already "pclose()d", or if
6132 #. type: Plain text
6133 #: build/C/man3/popen.3:146
6134 msgid ""
6135 "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or "
6136 "some other error is detected.  In the event of an error, these functions set "
6137 "I<errnro> to indicate the cause of the error."
6138 msgstr ""
6139
6140 #. type: Plain text
6141 #: build/C/man3/popen.3:165
6142 msgid ""
6143 "The B<popen>()  function does not set I<errno> if memory allocation fails.  "
6144 "If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set "
6145 "appropriately.  If the I<type> argument is invalid, and this condition is "
6146 "detected, I<errno> is set to B<EINVAL>."
6147 msgstr ""
6148
6149 #. type: Plain text
6150 #: build/C/man3/popen.3:172
6151 msgid ""
6152 "If B<pclose>()  cannot obtain the child status, I<errno> is set to "
6153 "B<ECHILD>."
6154 msgstr ""
6155
6156 #. type: Plain text
6157 #: build/C/man3/popen.3:178
6158 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
6159 msgstr ""
6160
6161 #. type: Plain text
6162 #: build/C/man3/popen.3:191
6163 msgid ""
6164 "Since the standard input of a command opened for reading shares its seek "
6165 "offset with the process that called B<popen>(), if the original process has "
6166 "done a buffered read, the command's input position may not be as expected.  "
6167 "Similarly, the output from a command opened for writing may become "
6168 "intermingled with that of the original process.  The latter can be avoided "
6169 "by calling B<fflush>(3)  before B<popen>()."
6170 msgstr ""
6171
6172 #.  .SH HISTORY
6173 #.  A
6174 #.  .BR popen ()
6175 #.  and a
6176 #.  .BR pclose ()
6177 #.  function appeared in Version 7 AT&T UNIX.
6178 #. type: Plain text
6179 #: build/C/man3/popen.3:201
6180 msgid ""
6181 "Failure to execute the shell is indistinguishable from the shell's failure "
6182 "to execute command, or an immediate exit of the command.  The only hint is "
6183 "an exit status of 127."
6184 msgstr ""
6185
6186 #. type: Plain text
6187 #: build/C/man3/popen.3:211
6188 msgid ""
6189 "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), "
6190 "B<fopen>(3), B<stdio>(3), B<system>(3)"
6191 msgstr ""
6192
6193 #. type: TH
6194 #: build/C/man3/printf.3:34
6195 #, no-wrap
6196 msgid "PRINTF"
6197 msgstr ""
6198
6199 #. type: TH
6200 #: build/C/man3/printf.3:34
6201 #, no-wrap
6202 msgid "2013-03-05"
6203 msgstr ""
6204
6205 #. type: Plain text
6206 #: build/C/man3/printf.3:38
6207 msgid ""
6208 "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - "
6209 "formatted output conversion"
6210 msgstr ""
6211
6212 #. type: Plain text
6213 #: build/C/man3/printf.3:42
6214 msgid "B<int printf(const char *>I<format>B<, ...);>"
6215 msgstr ""
6216
6217 #. type: Plain text
6218 #: build/C/man3/printf.3:44
6219 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
6220 msgstr ""
6221
6222 #. type: Plain text
6223 #: build/C/man3/printf.3:46
6224 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
6225 msgstr ""
6226
6227 #. type: Plain text
6228 #: build/C/man3/printf.3:48
6229 msgid ""
6230 "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char *>I<format>B<, "
6231 "...);>"
6232 msgstr ""
6233
6234 #. type: Plain text
6235 #: build/C/man3/printf.3:50
6236 msgid "B<#include E<lt>stdarg.hE<gt>>"
6237 msgstr ""
6238
6239 #. type: Plain text
6240 #: build/C/man3/printf.3:52
6241 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
6242 msgstr ""
6243
6244 #. type: Plain text
6245 #: build/C/man3/printf.3:54
6246 msgid ""
6247 "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
6248 ">I<ap>B<);>"
6249 msgstr ""
6250
6251 #. type: Plain text
6252 #: build/C/man3/printf.3:56
6253 msgid ""
6254 "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list "
6255 ">I<ap>B<);>"
6256 msgstr ""
6257
6258 #. type: Plain text
6259 #: build/C/man3/printf.3:59
6260 msgid ""
6261 "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char "
6262 "*>I<format>B<, va_list >I<ap>B<);>"
6263 msgstr ""
6264
6265 #. type: Plain text
6266 #: build/C/man3/printf.3:68
6267 msgid "B<snprintf>(), B<vsnprintf>():"
6268 msgstr ""
6269
6270 #. type: Plain text
6271 #: build/C/man3/printf.3:71
6272 msgid ""
6273 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || "
6274 "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
6275 msgstr ""
6276
6277 #. type: Plain text
6278 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
6279 msgid "or I<cc -std=c99>"
6280 msgstr ""
6281
6282 #. type: Plain text
6283 #: build/C/man3/printf.3:101
6284 msgid ""
6285 "The functions in the B<printf>()  family produce output according to a "
6286 "I<format> as described below.  The functions B<printf>()  and B<vprintf>()  "
6287 "write output to I<stdout>, the standard output stream; B<fprintf>()  and "
6288 "B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), "
6289 "B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character "
6290 "string I<str>."
6291 msgstr ""
6292
6293 #. type: Plain text
6294 #: build/C/man3/printf.3:110
6295 msgid ""
6296 "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes "
6297 "(including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
6298 msgstr ""
6299
6300 #. type: Plain text
6301 #: build/C/man3/printf.3:134
6302 msgid ""
6303 "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  "
6304 "are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), "
6305 "B<snprintf>(), respectively, except that they are called with a I<va_list> "
6306 "instead of a variable number of arguments.  These functions do not call the "
6307 "I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of "
6308 "I<ap> is undefined after the call.  See B<stdarg>(3)."
6309 msgstr ""
6310
6311 #. type: Plain text
6312 #: build/C/man3/printf.3:141
6313 msgid ""
6314 "These eight functions write the output under the control of a I<format> "
6315 "string that specifies how subsequent arguments (or arguments accessed via "
6316 "the variable-length argument facilities of B<stdarg>(3))  are converted for "
6317 "output."
6318 msgstr ""
6319
6320 #. type: Plain text
6321 #: build/C/man3/printf.3:152
6322 msgid ""
6323 "C99 and POSIX.1-2001 specify that the results are undefined if a call to "
6324 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause "
6325 "copying to take place between objects that overlap (e.g., if the target "
6326 "string array and one of the supplied input arguments refer to the same "
6327 "buffer).  See NOTES."
6328 msgstr ""
6329
6330 #. type: SS
6331 #: build/C/man3/printf.3:152
6332 #, no-wrap
6333 msgid "Return value"
6334 msgstr ""
6335
6336 #. type: Plain text
6337 #: build/C/man3/printf.3:155
6338 msgid ""
6339 "Upon successful return, these functions return the number of characters "
6340 "printed (excluding the null byte used to end output to strings)."
6341 msgstr ""
6342
6343 #. type: Plain text
6344 #: build/C/man3/printf.3:171
6345 msgid ""
6346 "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than "
6347 "I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If "
6348 "the output was truncated due to this limit then the return value is the "
6349 "number of characters (excluding the terminating null byte)  which would have "
6350 "been written to the final string if enough space had been available.  Thus, "
6351 "a return value of I<size> or more means that the output was truncated.  (See "
6352 "also below under NOTES.)"
6353 msgstr ""
6354
6355 #. type: Plain text
6356 #: build/C/man3/printf.3:173
6357 msgid "If an output error is encountered, a negative value is returned."
6358 msgstr ""
6359
6360 #. type: SS
6361 #: build/C/man3/printf.3:173
6362 #, no-wrap
6363 msgid "Format of the format string"
6364 msgstr ""
6365
6366 #. type: Plain text
6367 #: build/C/man3/printf.3:195
6368 msgid ""
6369 "The format string is a character string, beginning and ending in its initial "
6370 "shift state, if any.  The format string is composed of zero or more "
6371 "directives: ordinary characters (not B<%>), which are copied unchanged to "
6372 "the output stream; and conversion specifications, each of which results in "
6373 "fetching zero or more subsequent arguments.  Each conversion specification "
6374 "is introduced by the character B<%>, and ends with a I<conversion "
6375 "specifier>.  In between there may be (in this order) zero or more I<flags>, "
6376 "an optional minimum I<field width>, an optional I<precision> and an optional "
6377 "I<length modifier>."
6378 msgstr ""
6379
6380 #. type: Plain text
6381 #: build/C/man3/printf.3:208
6382 msgid ""
6383 "The arguments must correspond properly (after type promotion) with the "
6384 "conversion specifier.  By default, the arguments are used in the order "
6385 "given, where each \\(aq*\\(aq and each conversion specifier asks for the "
6386 "next argument (and it is an error if insufficiently many arguments are "
6387 "given).  One can also specify explicitly which argument is taken, at each "
6388 "place where an argument is required, by writing \"%m$\" instead of "
6389 "\\(aq%\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m "
6390 "denotes the position in the argument list of the desired argument, indexed "
6391 "starting from 1.  Thus,"
6392 msgstr ""
6393
6394 #. type: Plain text
6395 #: build/C/man3/printf.3:212
6396 #, no-wrap
6397 msgid "printf(\"%*d\", width, num);\n"
6398 msgstr ""
6399
6400 #. type: Plain text
6401 #: build/C/man3/printf.3:216
6402 msgid "and"
6403 msgstr ""
6404
6405 #. type: Plain text
6406 #: build/C/man3/printf.3:220
6407 #, no-wrap
6408 msgid "printf(\"%2$*1$d\", width, num);\n"
6409 msgstr ""
6410
6411 #. type: Plain text
6412 #: build/C/man3/printf.3:236
6413 msgid ""
6414 "are equivalent.  The second style allows repeated references to the same "
6415 "argument.  The C99 standard does not include the style using \\(aq$\\(aq, "
6416 "which comes from the Single UNIX Specification.  If the style using "
6417 "\\(aq$\\(aq is used, it must be used throughout for all conversions taking "
6418 "an argument and all width and precision arguments, but it may be mixed with "
6419 "\"%%\" formats which do not consume an argument.  There may be no gaps in "
6420 "the numbers of arguments specified using \\(aq$\\(aq; for example, if "
6421 "arguments 1 and 3 are specified, argument 2 must also be specified somewhere "
6422 "in the format string."
6423 msgstr ""
6424
6425 #. type: Plain text
6426 #: build/C/man3/printf.3:246
6427 msgid ""
6428 "For some numeric conversions a radix character (\"decimal point\") or "
6429 "thousands' grouping character is used.  The actual character used depends on "
6430 "the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as "
6431 "radix character, and does not have a grouping character.  Thus,"
6432 msgstr ""
6433
6434 #. type: Plain text
6435 #: build/C/man3/printf.3:250
6436 #, no-wrap
6437 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
6438 msgstr ""
6439
6440 #. type: Plain text
6441 #: build/C/man3/printf.3:255
6442 msgid ""
6443 "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the "
6444 "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
6445 msgstr ""
6446
6447 #. type: SS
6448 #: build/C/man3/printf.3:255
6449 #, no-wrap
6450 msgid "The flag characters"
6451 msgstr ""
6452
6453 #. type: Plain text
6454 #: build/C/man3/printf.3:257
6455 msgid "The character % is followed by zero or more of the following flags:"
6456 msgstr ""
6457
6458 #. type: TP
6459 #: build/C/man3/printf.3:257
6460 #, no-wrap
6461 msgid "B<#>"
6462 msgstr ""
6463
6464 #. type: Plain text
6465 #: build/C/man3/printf.3:291
6466 msgid ""
6467 "The value should be converted to an \"alternate form\".  For B<o> "
6468 "conversions, the first character of the output string is made zero (by "
6469 "prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a "
6470 "nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) "
6471 "prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> "
6472 "conversions, the result will always contain a decimal point, even if no "
6473 "digits follow it (normally, a decimal point appears in the results of those "
6474 "conversions only if a digit follows).  For B<g> and B<G> conversions, "
6475 "trailing zeros are not removed from the result as they would otherwise be.  "
6476 "For other conversions, the result is undefined."
6477 msgstr ""
6478
6479 #. type: TP
6480 #: build/C/man3/printf.3:291
6481 #, no-wrap
6482 msgid "B<\\&0>"
6483 msgstr ""
6484
6485 #. type: Plain text
6486 #: build/C/man3/printf.3:331
6487 msgid ""
6488 "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, "
6489 "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the "
6490 "converted value is padded on the left with zeros rather than blanks.  If the "
6491 "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a "
6492 "precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, "
6493 "and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior "
6494 "is undefined."
6495 msgstr ""
6496
6497 #. type: TP
6498 #: build/C/man3/printf.3:331
6499 #, no-wrap
6500 msgid "B<->"
6501 msgstr ""
6502
6503 #. type: Plain text
6504 #: build/C/man3/printf.3:344
6505 msgid ""
6506 "The converted value is to be left adjusted on the field boundary.  (The "
6507 "default is right justification.)  Except for B<n> conversions, the converted "
6508 "value is padded on the right with blanks, rather than on the left with "
6509 "blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
6510 msgstr ""
6511
6512 #. type: TP
6513 #: build/C/man3/printf.3:344
6514 #, no-wrap
6515 msgid "B<\\(aq \\(aq>"
6516 msgstr ""
6517
6518 #. type: Plain text
6519 #: build/C/man3/printf.3:348
6520 msgid ""
6521 "(a space) A blank should be left before a positive number (or empty string) "
6522 "produced by a signed conversion."
6523 msgstr ""
6524
6525 #. type: TP
6526 #: build/C/man3/printf.3:348
6527 #, no-wrap
6528 msgid "B<+>"
6529 msgstr ""
6530
6531 #. type: Plain text
6532 #: build/C/man3/printf.3:356
6533 msgid ""
6534 "A sign (+ or -) should always be placed before a number produced by a signed "
6535 "conversion.  By default a sign is used only for negative numbers.  A B<+> "
6536 "overrides a space if both are used."
6537 msgstr ""
6538
6539 #. type: Plain text
6540 #: build/C/man3/printf.3:359
6541 msgid ""
6542 "The five flag characters above are defined in the C standard.  The SUSv2 "
6543 "specifies one further flag character."
6544 msgstr ""
6545
6546 #. type: TP
6547 #: build/C/man3/printf.3:359
6548 #, no-wrap
6549 msgid "B<\\(aq>"
6550 msgstr ""
6551
6552 #. type: Plain text
6553 #: build/C/man3/printf.3:376
6554 msgid ""
6555 "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the "
6556 "output is to be grouped with thousands' grouping characters if the locale "
6557 "information indicates any.  Note that many versions of B<gcc>(1)  cannot "
6558 "parse this option and will issue a warning.  SUSv2 does not include "
6559 "I<%\\(aqF>."
6560 msgstr ""
6561
6562 #. type: Plain text
6563 #: build/C/man3/printf.3:378
6564 msgid "glibc 2.2 adds one further flag character."
6565 msgstr ""
6566
6567 #. type: TP
6568 #: build/C/man3/printf.3:378
6569 #, no-wrap
6570 msgid "B<I>"
6571 msgstr ""
6572
6573 #.  outdigits keyword in locale file
6574 #. type: Plain text
6575 #: build/C/man3/printf.3:388
6576 msgid ""
6577 "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the "
6578 "locale's alternative output digits, if any.  For example, since glibc 2.2.3 "
6579 "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
6580 msgstr ""
6581
6582 #. type: SS
6583 #: build/C/man3/printf.3:388
6584 #, no-wrap
6585 msgid "The field width"
6586 msgstr ""
6587
6588 #. type: Plain text
6589 #: build/C/man3/printf.3:404
6590 msgid ""
6591 "An optional decimal digit string (with nonzero first digit) specifying a "
6592 "minimum field width.  If the converted value has fewer characters than the "
6593 "field width, it will be padded with spaces on the left (or right, if the "
6594 "left-adjustment flag has been given).  Instead of a decimal digit string one "
6595 "may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that "
6596 "the field width is given in the next argument, or in the I<m>-th argument, "
6597 "respectively, which must be of type I<int>.  A negative field width is taken "
6598 "as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a "
6599 "nonexistent or small field width cause truncation of a field; if the result "
6600 "of a conversion is wider than the field width, the field is expanded to "
6601 "contain the conversion result."
6602 msgstr ""
6603
6604 #. type: SS
6605 #: build/C/man3/printf.3:404
6606 #, no-wrap
6607 msgid "The precision"
6608 msgstr ""
6609
6610 #. type: Plain text
6611 #: build/C/man3/printf.3:440
6612 msgid ""
6613 "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an "
6614 "optional decimal digit string.  Instead of a decimal digit string one may "
6615 "write \"*\" or \"*m$\" (for some decimal integer m) to specify that the "
6616 "precision is given in the next argument, or in the m-th argument, "
6617 "respectively, which must be of type I<int>.  If the precision is given as "
6618 "just \\(aq.\\(aq, or the precision is negative, the precision is taken to be "
6619 "zero.  This gives the minimum number of digits to appear for B<d>, B<i>, "
6620 "B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after "
6621 "the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, "
6622 "the maximum number of significant digits for B<g> and B<G> conversions, or "
6623 "the maximum number of characters to be printed from a string for B<s> and "
6624 "B<S> conversions."
6625 msgstr ""
6626
6627 #. type: SS
6628 #: build/C/man3/printf.3:440
6629 #, no-wrap
6630 msgid "The length modifier"
6631 msgstr ""
6632
6633 #. type: Plain text
6634 #: build/C/man3/printf.3:450
6635 msgid ""
6636 "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or "
6637 "B<X> conversion."
6638 msgstr ""
6639
6640 #. type: TP
6641 #: build/C/man3/printf.3:450 build/C/man3/scanf.3:294
6642 #, no-wrap
6643 msgid "B<hh>"
6644 msgstr ""
6645
6646 #. type: Plain text
6647 #: build/C/man3/printf.3:461
6648 msgid ""
6649 "A following integer conversion corresponds to a I<signed char> or I<unsigned "
6650 "char> argument, or a following B<n> conversion corresponds to a pointer to a "
6651 "I<signed char> argument."
6652 msgstr ""
6653
6654 #. type: TP
6655 #: build/C/man3/printf.3:461 build/C/man3/scanf.3:284
6656 #, no-wrap
6657 msgid "B<h>"
6658 msgstr ""
6659
6660 #. type: Plain text
6661 #: build/C/man3/printf.3:472
6662 msgid ""
6663 "A following integer conversion corresponds to a I<short int> or I<unsigned "
6664 "short int> argument, or a following B<n> conversion corresponds to a pointer "
6665 "to a I<short int> argument."
6666 msgstr ""
6667
6668 #. type: TP
6669 #: build/C/man3/printf.3:472 build/C/man3/scanf.3:311
6670 #, no-wrap
6671 msgid "B<l>"
6672 msgstr ""
6673
6674 #. type: Plain text
6675 #: build/C/man3/printf.3:491
6676 msgid ""
6677 "(ell) A following integer conversion corresponds to a I<long int> or "
6678 "I<unsigned long int> argument, or a following B<n> conversion corresponds to "
6679 "a pointer to a I<long int> argument, or a following B<c> conversion "
6680 "corresponds to a I<wint_t> argument, or a following B<s> conversion "
6681 "corresponds to a pointer to I<wchar_t> argument."
6682 msgstr ""
6683
6684 #. type: TP
6685 #: build/C/man3/printf.3:491
6686 #, no-wrap
6687 msgid "B<ll>"
6688 msgstr ""
6689
6690 #. type: Plain text
6691 #: build/C/man3/printf.3:503
6692 msgid ""
6693 "(ell-ell).  A following integer conversion corresponds to a I<long long int> "
6694 "or I<unsigned long long int> argument, or a following B<n> conversion "
6695 "corresponds to a pointer to a I<long long int> argument."
6696 msgstr ""
6697
6698 #. type: TP
6699 #: build/C/man3/printf.3:503 build/C/man3/scanf.3:338
6700 #, no-wrap
6701 msgid "B<L>"
6702 msgstr ""
6703
6704 #. type: Plain text
6705 #: build/C/man3/printf.3:519
6706 msgid ""
6707 "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion "
6708 "corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does "
6709 "not.)"
6710 msgstr ""
6711
6712 #. type: TP
6713 #: build/C/man3/printf.3:519 build/C/man3/scanf.3:354
6714 #, no-wrap
6715 msgid "B<q>"
6716 msgstr ""
6717
6718 #. type: Plain text
6719 #: build/C/man3/printf.3:525
6720 msgid ""
6721 "(\"quad\". 4.4BSD and Linux libc5 only.  Don't use.)  This is a synonym for "
6722 "B<ll>."
6723 msgstr ""
6724
6725 #. type: TP
6726 #: build/C/man3/printf.3:525 build/C/man3/scanf.3:302
6727 #, no-wrap
6728 msgid "B<j>"
6729 msgstr ""
6730
6731 #. type: Plain text
6732 #: build/C/man3/printf.3:532
6733 msgid ""
6734 "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> "
6735 "argument."
6736 msgstr ""
6737
6738 #. type: TP
6739 #: build/C/man3/printf.3:532 build/C/man3/scanf.3:366
6740 #, no-wrap
6741 msgid "B<z>"
6742 msgstr ""
6743
6744 #. type: Plain text
6745 #: build/C/man3/printf.3:543
6746 msgid ""
6747 "A following integer conversion corresponds to a I<size_t> or I<ssize_t> "
6748 "argument.  (Linux libc5 has B<Z> with this meaning.  Don't use it.)"
6749 msgstr ""
6750
6751 #. type: TP
6752 #: build/C/man3/printf.3:543 build/C/man3/scanf.3:359
6753 #, no-wrap
6754 msgid "B<t>"
6755 msgstr ""
6756
6757 #. type: Plain text
6758 #: build/C/man3/printf.3:548
6759 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument."
6760 msgstr ""
6761
6762 #. type: Plain text
6763 #: build/C/man3/printf.3:577
6764 msgid ""
6765 "The SUSv2 knows about only the length modifiers B<h> (in B<hd>, B<hi>, "
6766 "B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, "
6767 "B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
6768 msgstr ""
6769
6770 #. type: SS
6771 #: build/C/man3/printf.3:577
6772 #, no-wrap
6773 msgid "The conversion specifier"
6774 msgstr ""
6775
6776 #. type: Plain text
6777 #: build/C/man3/printf.3:580
6778 msgid ""
6779 "A character that specifies the type of conversion to be applied.  The "
6780 "conversion specifiers and their meanings are:"
6781 msgstr ""
6782
6783 #. type: TP
6784 #: build/C/man3/printf.3:580
6785 #, no-wrap
6786 msgid "B<d>, B<i>"
6787 msgstr ""
6788
6789 #. type: Plain text
6790 #: build/C/man3/printf.3:590
6791 msgid ""
6792 "The I<int> argument is converted to signed decimal notation.  The precision, "
6793 "if any, gives the minimum number of digits that must appear; if the "
6794 "converted value requires fewer digits, it is padded on the left with zeros.  "
6795 "The default precision is 1.  When 0 is printed with an explicit precision 0, "
6796 "the output is empty."
6797 msgstr ""
6798
6799 #. type: TP
6800 #: build/C/man3/printf.3:590
6801 #, no-wrap
6802 msgid "B<o>, B<u>, B<x>, B<X>"
6803 msgstr ""
6804
6805 #. type: Plain text
6806 #: build/C/man3/printf.3:617
6807 msgid ""
6808 "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned "
6809 "decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The "
6810 "letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are "
6811 "used for B<X> conversions.  The precision, if any, gives the minimum number "
6812 "of digits that must appear; if the converted value requires fewer digits, it "
6813 "is padded on the left with zeros.  The default precision is 1.  When 0 is "
6814 "printed with an explicit precision 0, the output is empty."
6815 msgstr ""
6816
6817 #. type: TP
6818 #: build/C/man3/printf.3:617
6819 #, no-wrap
6820 msgid "B<e>, B<E>"
6821 msgstr ""
6822
6823 #. type: Plain text
6824 #: build/C/man3/printf.3:636
6825 msgid ""
6826 "The I<double> argument is rounded and converted in the style "
6827 "[-]dB<\\&.>dddB<e>\\(+-dd where there is one digit before the decimal-point "
6828 "character and the number of digits after it is equal to the precision; if "
6829 "the precision is missing, it is taken as 6; if the precision is zero, no "
6830 "decimal-point character appears.  An B<E> conversion uses the letter B<E> "
6831 "(rather than B<e>)  to introduce the exponent.  The exponent always contains "
6832 "at least two digits; if the value is zero, the exponent is 00."
6833 msgstr ""
6834
6835 #. type: TP
6836 #: build/C/man3/printf.3:636
6837 #, no-wrap
6838 msgid "B<f>, B<F>"
6839 msgstr ""
6840
6841 #. type: Plain text
6842 #: build/C/man3/printf.3:647
6843 msgid ""
6844 "The I<double> argument is rounded and converted to decimal notation in the "
6845 "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point "
6846 "character is equal to the precision specification.  If the precision is "
6847 "missing, it is taken as 6; if the precision is explicitly zero, no "
6848 "decimal-point character appears.  If a decimal point appears, at least one "
6849 "digit appears before it."
6850 msgstr ""
6851
6852 #. type: Plain text
6853 #: build/C/man3/printf.3:658
6854 msgid ""
6855 "(The SUSv2 does not know about B<F> and says that character string "
6856 "representations for infinity and NaN may be made available.  The C99 "
6857 "standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string "
6858 "starting with \"nan\" for NaN, in the case of B<f> conversion, and "
6859 "\"[-]INF\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
6860 msgstr ""
6861
6862 #. type: TP
6863 #: build/C/man3/printf.3:658
6864 #, no-wrap
6865 msgid "B<g>, B<G>"
6866 msgstr ""
6867
6868 #. type: Plain text
6869 #: build/C/man3/printf.3:683
6870 msgid ""
6871 "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> "
6872 "for B<G> conversions).  The precision specifies the number of significant "
6873 "digits.  If the precision is missing, 6 digits are given; if the precision "
6874 "is zero, it is treated as 1.  Style B<e> is used if the exponent from its "
6875 "conversion is less than -4 or greater than or equal to the precision.  "
6876 "Trailing zeros are removed from the fractional part of the result; a decimal "
6877 "point appears only if it is followed by at least one digit."
6878 msgstr ""
6879
6880 #. type: TP
6881 #: build/C/man3/printf.3:683
6882 #, no-wrap
6883 msgid "B<a>, B<A>"
6884 msgstr ""
6885
6886 #. type: Plain text
6887 #: build/C/man3/printf.3:707
6888 msgid ""
6889 "(C99; not in SUSv2) For B<a> conversion, the I<double> argument is converted "
6890 "to hexadecimal notation (using the letters abcdef)  in the style "
6891 "[-]B<0x>hB<\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the "
6892 "letters ABCDEF, and the exponent separator B<P> is used.  There is one "
6893 "hexadecimal digit before the decimal point, and the number of digits after "
6894 "it is equal to the precision.  The default precision suffices for an exact "
6895 "representation of the value if an exact representation in base 2 exists and "
6896 "otherwise is sufficiently large to distinguish values of type I<double>.  "
6897 "The digit before the decimal point is unspecified for nonnormalized numbers, "
6898 "and nonzero but otherwise unspecified for normalized numbers."
6899 msgstr ""
6900
6901 #. type: TP
6902 #: build/C/man3/printf.3:707 build/C/man3/scanf.3:459 build/C/man3/wprintf.3:151
6903 #, no-wrap
6904 msgid "B<c>"
6905 msgstr ""
6906
6907 #. type: Plain text
6908 #: build/C/man3/printf.3:725
6909 msgid ""
6910 "If no B<l> modifier is present, the I<int> argument is converted to an "
6911 "I<unsigned char>, and the resulting character is written.  If an B<l> "
6912 "modifier is present, the I<wint_t> (wide character) argument is converted to "
6913 "a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a "
6914 "conversion state starting in the initial state, and the resulting multibyte "
6915 "string is written."
6916 msgstr ""
6917
6918 #. type: TP
6919 #: build/C/man3/printf.3:725 build/C/man3/scanf.3:451 build/C/man3/wprintf.3:165
6920 #, no-wrap
6921 msgid "B<s>"
6922 msgstr ""
6923
6924 #. type: Plain text
6925 #: build/C/man3/printf.3:740
6926 msgid ""
6927 "If no B<l> modifier is present: The I<const char\\ *> argument is expected "
6928 "to be a pointer to an array of character type (pointer to a string).  "
6929 "Characters from the array are written up to (but not including) a "
6930 "terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more "
6931 "than the number specified are written.  If a precision is given, no null "
6932 "byte need be present; if the precision is not specified, or is greater than "
6933 "the size of the array, the array must contain a terminating null byte."
6934 msgstr ""
6935
6936 #. type: Plain text
6937 #: build/C/man3/printf.3:767
6938 msgid ""
6939 "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is "
6940 "expected to be a pointer to an array of wide characters.  Wide characters "
6941 "from the array are converted to multibyte characters (each by a call to the "
6942 "B<wcrtomb>(3)  function, with a conversion state starting in the initial "
6943 "state before the first wide character), up to and including a terminating "
6944 "null wide character.  The resulting multibyte characters are written up to "
6945 "(but not including) the terminating null byte.  If a precision is specified, "
6946 "no more bytes than the number specified are written, but no partial "
6947 "multibyte characters are written.  Note that the precision determines the "
6948 "number of I<bytes> written, not the number of I<wide characters> or I<screen "
6949 "positions>.  The array must contain a terminating null wide character, "
6950 "unless a precision is given and it is so small that the number of bytes "
6951 "written exceeds it before the end of the array is reached."
6952 msgstr ""
6953
6954 #. type: TP
6955 #: build/C/man3/printf.3:767
6956 #, no-wrap
6957 msgid "B<C>"
6958 msgstr ""
6959
6960 #. type: Plain text
6961 #: build/C/man3/printf.3:773
6962 msgid "(Not in C99, but in SUSv2.)  Synonym for B<lc>.  Don't use."
6963 msgstr ""
6964
6965 #. type: TP
6966 #: build/C/man3/printf.3:773
6967 #, no-wrap
6968 msgid "B<S>"
6969 msgstr ""
6970
6971 #. type: Plain text
6972 #: build/C/man3/printf.3:779
6973 msgid "(Not in C99, but in SUSv2.)  Synonym for B<ls>.  Don't use."
6974 msgstr ""
6975
6976 #. type: TP
6977 #: build/C/man3/printf.3:779 build/C/man3/scanf.3:502
6978 #, no-wrap
6979 msgid "B<p>"
6980 msgstr ""
6981
6982 #. type: Plain text
6983 #: build/C/man3/printf.3:787
6984 msgid ""
6985 "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> "
6986 "or B<%#lx>)."
6987 msgstr ""
6988
6989 #. type: TP
6990 #: build/C/man3/printf.3:787 build/C/man3/scanf.3:510
6991 #, no-wrap
6992 msgid "B<n>"
6993 msgstr ""
6994
6995 #. type: Plain text
6996 #: build/C/man3/printf.3:794
6997 msgid ""
6998 "The number of characters written so far is stored into the integer indicated "
6999 "by the I<int\\ *> (or variant) pointer argument.  No argument is converted."
7000 msgstr ""
7001
7002 #. type: TP
7003 #: build/C/man3/printf.3:794
7004 #, no-wrap
7005 msgid "B<m>"
7006 msgstr ""
7007
7008 #. type: Plain text
7009 #: build/C/man3/printf.3:800
7010 msgid ""
7011 "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is "
7012 "required."
7013 msgstr ""
7014
7015 #. type: TP
7016 #: build/C/man3/printf.3:800 build/C/man3/scanf.3:377
7017 #, no-wrap
7018 msgid "B<%>"
7019 msgstr ""
7020
7021 #. type: Plain text
7022 #: build/C/man3/printf.3:806
7023 msgid ""
7024 "A \\(aq%\\(aq is written.  No argument is converted.  The complete "
7025 "conversion specification is \\(aq%%\\(aq."
7026 msgstr ""
7027
7028 #. type: Plain text
7029 #: build/C/man3/printf.3:821
7030 msgid ""
7031 "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), "
7032 "and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and "
7033 "B<vsnprintf>()  functions conform to C99."
7034 msgstr ""
7035
7036 #. type: Plain text
7037 #: build/C/man3/printf.3:834
7038 msgid ""
7039 "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each "
7040 "other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an "
7041 "unspecified return value less than 1, while C99 allows I<str> to be NULL in "
7042 "this case, and gives the return value (as always)  as the number of "
7043 "characters that would have been written in case the output string has been "
7044 "large enough."
7045 msgstr ""
7046
7047 #. type: Plain text
7048 #: build/C/man3/printf.3:848
7049 msgid ""
7050 "Linux libc4 knows about the five C standard flags.  It knows about the "
7051 "length modifiers B<h>, B<l>, B<L>, and the conversions B<c>, B<d>, B<e>, "
7052 "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 "
7053 "B<X>, where B<F> is a synonym for B<f>.  Additionally, it accepts B<D>, "
7054 "B<O>, and B<U> as synonyms for B<ld>, B<lo>, and B<lu>.  (This is bad, and "
7055 "caused serious bugs later, when support for B<%D> disappeared.)  No "
7056 "locale-dependent radix character, no thousands' separator, no NaN or "
7057 "infinity, no \"%m$\" and \"*m$\"."
7058 msgstr ""
7059
7060 #. type: Plain text
7061 #: build/C/man3/printf.3:859
7062 msgid ""
7063 "Linux libc5 knows about the five C standard flags and the \\(aq flag, "
7064 "locale, \"%m$\" and \"*m$\".  It knows about the length modifiers B<h>, "
7065 "B<l>, B<L>, B<Z>, and B<q>, but accepts B<L> and B<q> both for I<long "
7066 "double> and for I<long long int> (this is a bug).  It no longer recognizes "
7067 "B<F>, B<D>, B<O>, and B<U>, but adds the conversion character B<m>, which "
7068 "outputs I<strerror(errno)>."
7069 msgstr ""
7070
7071 #. type: Plain text
7072 #: build/C/man3/printf.3:861
7073 msgid "glibc 2.0 adds conversion characters B<C> and B<S>."
7074 msgstr ""
7075
7076 #. type: Plain text
7077 #: build/C/man3/printf.3:864
7078 msgid ""
7079 "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion "
7080 "characters B<a> and B<A>."
7081 msgstr ""
7082
7083 #. type: Plain text
7084 #: build/C/man3/printf.3:867
7085 msgid ""
7086 "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the "
7087 "flag character B<I>."
7088 msgstr ""
7089
7090 #. type: Plain text
7091 #: build/C/man3/printf.3:869
7092 msgid "Some programs imprudently rely on code such as the following"
7093 msgstr ""
7094
7095 #. type: Plain text
7096 #: build/C/man3/printf.3:871
7097 #, no-wrap
7098 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
7099 msgstr ""
7100
7101 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
7102 #. type: Plain text
7103 #: build/C/man3/printf.3:887
7104 msgid ""
7105 "to append text to I<buf>.  However, the standards explicitly note that the "
7106 "results are undefined if source and destination buffers overlap when calling "
7107 "B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending "
7108 "on the version of B<gcc>(1)  used, and the compiler options employed, calls "
7109 "such as the above will B<not> produce the expected results."
7110 msgstr ""
7111
7112 #.  .SH HISTORY
7113 #.  UNIX V7 defines the three routines
7114 #.  .BR printf (),
7115 #.  .BR fprintf (),
7116 #.  .BR sprintf (),
7117 #.  and has the flag \-, the width or precision *, the length modifier l,
7118 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
7119 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
7120 #.  #, + and <space> and no longer mentions D,O,U,X.
7121 #.  2.11BSD has
7122 #.  .BR vprintf (),
7123 #.  .BR vfprintf (),
7124 #.  .BR vsprintf (),
7125 #.  and warns not to use D,O,U,X.
7126 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
7127 #.  and the conversions n, p, E, G, X (with current meaning)
7128 #.  and deprecates D,O,U.
7129 #.  4.4BSD introduces the functions
7130 #.  .BR snprintf ()
7131 #.  and
7132 #.  .BR vsnprintf (),
7133 #.  and the length modifier q.
7134 #.  FreeBSD also has functions
7135 #.  .BR asprintf ()
7136 #.  and
7137 #.  .BR vasprintf (),
7138 #.  that allocate a buffer large enough for
7139 #.  .BR sprintf ().
7140 #.  In glibc there are functions
7141 #.  .BR dprintf ()
7142 #.  and
7143 #.  .BR vdprintf ()
7144 #.  that print to a file descriptor instead of a stream.
7145 #. type: Plain text
7146 #: build/C/man3/printf.3:929
7147 msgid ""
7148 "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  "
7149 "conforms to the C99 standard, that is, behaves as described above, since "
7150 "glibc version 2.1.  Until glibc 2.0.6 they would return -1 when the output "
7151 "was truncated."
7152 msgstr ""
7153
7154 #. type: Plain text
7155 #: build/C/man3/printf.3:946
7156 msgid ""
7157 "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, "
7158 "callers must be careful not to overflow the actual space; this is often "
7159 "impossible to assure.  Note that the length of the strings produced is "
7160 "locale-dependent and difficult to predict.  Use B<snprintf>()  and "
7161 "B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
7162 msgstr ""
7163
7164 #. type: Plain text
7165 #: build/C/man3/printf.3:959
7166 msgid ""
7167 "Linux libc4.[45] does not have a B<snprintf>(), but provides a libbsd that "
7168 "contains an B<snprintf>()  equivalent to B<sprintf>(), that is, one that "
7169 "ignores the I<size> argument.  Thus, the use of B<snprintf>()  with early "
7170 "libc4 leads to serious security problems."
7171 msgstr ""
7172
7173 #.  .PP
7174 #.  Some floating-point conversions under early libc4
7175 #.  caused memory leaks.
7176 #. type: Plain text
7177 #: build/C/man3/printf.3:973
7178 msgid ""
7179 "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may "
7180 "contain a % character.  If I<foo> comes from untrusted user input, it may "
7181 "contain B<%n>, causing the B<printf>()  call to write to memory and creating "
7182 "a security hole."
7183 msgstr ""
7184
7185 #. type: Plain text
7186 #: build/C/man3/printf.3:977
7187 msgid "To print I<Pi> to five decimal places:"
7188 msgstr ""
7189
7190 #. type: Plain text
7191 #: build/C/man3/printf.3:983
7192 #, no-wrap
7193 msgid ""
7194 "#include E<lt>math.hE<gt>\n"
7195 "#include E<lt>stdio.hE<gt>\n"
7196 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
7197 msgstr ""
7198
7199 #. type: Plain text
7200 #: build/C/man3/printf.3:992
7201 msgid ""
7202 "To print a date and time in the form \"Sunday, July 3, 10:02\", where "
7203 "I<weekday> and I<month> are pointers to strings:"
7204 msgstr ""
7205
7206 #. type: Plain text
7207 #: build/C/man3/printf.3:998
7208 #, no-wrap
7209 msgid ""
7210 "#include E<lt>stdio.hE<gt>\n"
7211 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
7212 "        weekday, month, day, hour, min);\n"
7213 msgstr ""
7214
7215 #. type: Plain text
7216 #: build/C/man3/printf.3:1004
7217 msgid ""
7218 "Many countries use the day-month-year order.  Hence, an internationalized "
7219 "version must be able to print the arguments in an order specified by the "
7220 "format:"
7221 msgstr ""
7222
7223 #. type: Plain text
7224 #: build/C/man3/printf.3:1010
7225 #, no-wrap
7226 msgid ""
7227 "#include E<lt>stdio.hE<gt>\n"
7228 "fprintf(stdout, format,\n"
7229 "        weekday, month, day, hour, min);\n"
7230 msgstr ""
7231
7232 #. type: Plain text
7233 #: build/C/man3/printf.3:1017
7234 msgid ""
7235 "where I<format> depends on locale, and may permute the arguments.  With the "
7236 "value:"
7237 msgstr ""
7238
7239 #. type: Plain text
7240 #: build/C/man3/printf.3:1021
7241 #, no-wrap
7242 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
7243 msgstr ""
7244
7245 #. type: Plain text
7246 #: build/C/man3/printf.3:1025
7247 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
7248 msgstr ""
7249
7250 #. type: Plain text
7251 #: build/C/man3/printf.3:1028
7252 msgid ""
7253 "To allocate a sufficiently large string and print into it (code correct for "
7254 "both glibc 2.0 and glibc 2.1):"
7255 msgstr ""
7256
7257 #. type: Plain text
7258 #: build/C/man3/printf.3:1031
7259 msgid ""
7260 "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an "
7261 "error instead of being handled gracefully."
7262 msgstr ""
7263
7264 #. type: Plain text
7265 #: build/C/man3/printf.3:1036
7266 #, no-wrap
7267 msgid ""
7268 "#include E<lt>stdio.hE<gt>\n"
7269 "#include E<lt>stdlib.hE<gt>\n"
7270 "#include E<lt>stdarg.hE<gt>\n"
7271 msgstr ""
7272
7273 #. type: Plain text
7274 #: build/C/man3/printf.3:1044
7275 #, no-wrap
7276 msgid ""
7277 "char *\n"
7278 "make_message(const char *fmt, ...)\n"
7279 "{\n"
7280 "    int n;\n"
7281 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
7282 "    char *p, *np;\n"
7283 "    va_list ap;\n"
7284 msgstr ""
7285
7286 #. type: Plain text
7287 #: build/C/man3/printf.3:1047
7288 #, no-wrap
7289 msgid ""
7290 "    if ((p = malloc(size)) == NULL)\n"
7291 "        return NULL;\n"
7292 msgstr ""
7293
7294 #. type: Plain text
7295 #: build/C/man3/printf.3:1049
7296 #, no-wrap
7297 msgid "    while (1) {\n"
7298 msgstr ""
7299
7300 #. type: Plain text
7301 #: build/C/man3/printf.3:1051
7302 #, no-wrap
7303 msgid "        /* Try to print in the allocated space */\n"
7304 msgstr ""
7305
7306 #. type: Plain text
7307 #: build/C/man3/printf.3:1055
7308 #, no-wrap
7309 msgid ""
7310 "        va_start(ap, fmt);\n"
7311 "        n = vsnprintf(p, size, fmt, ap);\n"
7312 "        va_end(ap);\n"
7313 msgstr ""
7314
7315 #. type: Plain text
7316 #: build/C/man3/printf.3:1057
7317 #, no-wrap
7318 msgid "        /* Check error code */\n"
7319 msgstr ""
7320
7321 #. type: Plain text
7322 #: build/C/man3/printf.3:1060
7323 #, no-wrap
7324 msgid ""
7325 "        if (n E<lt> 0)\n"
7326 "            return NULL;\n"
7327 msgstr ""
7328
7329 #. type: Plain text
7330 #: build/C/man3/printf.3:1062
7331 #, no-wrap
7332 msgid "        /* If that worked, return the string */\n"
7333 msgstr ""
7334
7335 #. type: Plain text
7336 #: build/C/man3/printf.3:1065
7337 #, no-wrap
7338 msgid ""
7339 "        if (n E<lt> size)\n"
7340 "            return p;\n"
7341 msgstr ""
7342
7343 #. type: Plain text
7344 #: build/C/man3/printf.3:1067
7345 #, no-wrap
7346 msgid "        /* Else try again with more space */\n"
7347 msgstr ""
7348
7349 #. type: Plain text
7350 #: build/C/man3/printf.3:1069
7351 #, no-wrap
7352 msgid "        size = n + 1;       /* Precisely what is needed */\n"
7353 msgstr ""
7354
7355 #. type: Plain text
7356 #: build/C/man3/printf.3:1079
7357 #, no-wrap
7358 msgid ""
7359 "        if ((np = realloc (p, size)) == NULL) {\n"
7360 "            free(p);\n"
7361 "            return NULL;\n"
7362 "        } else {\n"
7363 "            p = np;\n"
7364 "        }\n"
7365 "    }\n"
7366 "}\n"
7367 msgstr ""
7368
7369 #. type: Plain text
7370 #: build/C/man3/printf.3:1089
7371 msgid ""
7372 "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), "
7373 "B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
7374 msgstr ""
7375
7376 #. type: TH
7377 #: build/C/man3/puts.3:26
7378 #, no-wrap
7379 msgid "PUTS"
7380 msgstr ""
7381
7382 #. type: TH
7383 #: build/C/man3/puts.3:26
7384 #, no-wrap
7385 msgid "2011-09-28"
7386 msgstr ""
7387
7388 #. type: Plain text
7389 #: build/C/man3/puts.3:29
7390 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
7391 msgstr ""
7392
7393 #. type: Plain text
7394 #: build/C/man3/puts.3:34
7395 #, no-wrap
7396 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
7397 msgstr ""
7398
7399 #. type: Plain text
7400 #: build/C/man3/puts.3:36
7401 #, no-wrap
7402 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
7403 msgstr ""
7404
7405 #. type: Plain text
7406 #: build/C/man3/puts.3:38
7407 #, no-wrap
7408 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
7409 msgstr ""
7410
7411 #. type: Plain text
7412 #: build/C/man3/puts.3:40
7413 #, no-wrap
7414 msgid "B<int putchar(int >I<c>B<);>\n"
7415 msgstr ""
7416
7417 #. type: Plain text
7418 #: build/C/man3/puts.3:42
7419 #, no-wrap
7420 msgid "B<int puts(const char *>I<s>B<);>\n"
7421 msgstr ""
7422
7423 #. type: Plain text
7424 #: build/C/man3/puts.3:51
7425 msgid ""
7426 "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to "
7427 "I<stream>."
7428 msgstr ""
7429
7430 #. type: Plain text
7431 #: build/C/man3/puts.3:58
7432 msgid ""
7433 "B<fputs>()  writes the string I<s> to I<stream>, without its terminating "
7434 "null byte (\\(aq\\e0\\(aq)."
7435 msgstr ""
7436
7437 #. type: Plain text
7438 #: build/C/man3/puts.3:65
7439 msgid ""
7440 "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as "
7441 "a macro which evaluates I<stream> more than once."
7442 msgstr ""
7443
7444 #. type: Plain text
7445 #: build/C/man3/puts.3:69
7446 msgid "B<putchar(>I<c>B<);> is equivalent to B<putc(>I<c>B<,>I<stdout>B<).>"
7447 msgstr ""
7448
7449 #. type: Plain text
7450 #: build/C/man3/puts.3:76
7451 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
7452 msgstr ""
7453
7454 #. type: Plain text
7455 #: build/C/man3/puts.3:81
7456 msgid ""
7457 "Calls to the functions described here can be mixed with each other and with "
7458 "calls to other output functions from the I<stdio> library for the same "
7459 "output stream."
7460 msgstr ""
7461
7462 #. type: Plain text
7463 #: build/C/man3/puts.3:96
7464 msgid ""
7465 "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an "
7466 "I<unsigned char> cast to an I<int> or B<EOF> on error."
7467 msgstr ""
7468
7469 #. type: Plain text
7470 #: build/C/man3/puts.3:103
7471 msgid ""
7472 "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> "
7473 "on error."
7474 msgstr ""
7475
7476 #. type: Plain text
7477 #: build/C/man3/puts.3:112
7478 msgid ""
7479 "It is not advisable to mix calls to output functions from the I<stdio> "
7480 "library with low-level calls to B<write>(2)  for the file descriptor "
7481 "associated with the same output stream; the results will be undefined and "
7482 "very probably not what you want."
7483 msgstr ""
7484
7485 #. type: Plain text
7486 #: build/C/man3/puts.3:124
7487 msgid ""
7488 "B<write>(2), B<ferror>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), "
7489 "B<fseek>(3), B<fwrite>(3), B<gets>(3), B<putwchar>(3), B<scanf>(3), "
7490 "B<unlocked_stdio>(3)"
7491 msgstr ""
7492
7493 #. type: TH
7494 #: build/C/man2/read.2:35
7495 #, no-wrap
7496 msgid "READ"
7497 msgstr ""
7498
7499 #. type: TH
7500 #: build/C/man2/read.2:35
7501 #, no-wrap
7502 msgid "2013-02-12"
7503 msgstr ""
7504
7505 #. type: Plain text
7506 #: build/C/man2/read.2:38
7507 msgid "read - read from a file descriptor"
7508 msgstr ""
7509
7510 #. type: Plain text
7511 #: build/C/man2/read.2:43
7512 #, no-wrap
7513 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
7514 msgstr ""
7515
7516 #. type: Plain text
7517 #: build/C/man2/read.2:52
7518 msgid ""
7519 "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> "
7520 "into the buffer starting at I<buf>."
7521 msgstr ""
7522
7523 #. type: Plain text
7524 #: build/C/man2/read.2:60
7525 msgid ""
7526 "On files that support seeking, the read operation commences at the current "
7527 "file offset, and the file offset is incremented by the number of bytes "
7528 "read.  If the current file offset is at or past the end of file, no bytes "
7529 "are read, and B<read>()  returns zero."
7530 msgstr ""
7531
7532 #. type: Plain text
7533 #: build/C/man2/read.2:75
7534 msgid ""
7535 "If I<count> is zero, B<read>()  I<may> detect the errors described below.  "
7536 "In the absence of any errors, or if B<read>()  does not check for errors, a "
7537 "B<read>()  with a I<count> of 0 returns zero and has no other effects."
7538 msgstr ""
7539
7540 #. type: Plain text
7541 #: build/C/man2/read.2:81
7542 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
7543 msgstr ""
7544
7545 #. type: Plain text
7546 #: build/C/man2/read.2:95
7547 msgid ""
7548 "On success, the number of bytes read is returned (zero indicates end of "
7549 "file), and the file position is advanced by this number.  It is not an error "
7550 "if this number is smaller than the number of bytes requested; this may "
7551 "happen for example because fewer bytes are actually available right now "
7552 "(maybe because we were close to end-of-file, or because we are reading from "
7553 "a pipe, or from a terminal), or because B<read>()  was interrupted by a "
7554 "signal.  On error, -1 is returned, and I<errno> is set appropriately.  In "
7555 "this case it is left unspecified whether the file position (if any) changes."
7556 msgstr ""
7557
7558 #. type: TP
7559 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
7560 #, no-wrap
7561 msgid "B<EAGAIN>"
7562 msgstr ""
7563
7564 #. type: Plain text
7565 #: build/C/man2/read.2:103
7566 msgid ""
7567 "The file descriptor I<fd> refers to a file other than a socket and has been "
7568 "marked nonblocking (B<O_NONBLOCK>), and the read would block."
7569 msgstr ""
7570
7571 #. type: TP
7572 #: build/C/man2/read.2:103 build/C/man2/write.2:115
7573 #, no-wrap
7574 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
7575 msgstr ""
7576
7577 #.  Actually EAGAIN on Linux
7578 #. type: Plain text
7579 #: build/C/man2/read.2:114
7580 msgid ""
7581 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
7582 "(B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error "
7583 "to be returned for this case, and does not require these constants to have "
7584 "the same value, so a portable application should check for both "
7585 "possibilities."
7586 msgstr ""
7587
7588 #. type: Plain text
7589 #: build/C/man2/read.2:118
7590 msgid "I<fd> is not a valid file descriptor or is not open for reading."
7591 msgstr ""
7592
7593 #. type: Plain text
7594 #: build/C/man2/read.2:122 build/C/man2/write.2:145
7595 msgid "I<buf> is outside your accessible address space."
7596 msgstr ""
7597
7598 #. type: Plain text
7599 #: build/C/man2/read.2:126
7600 msgid ""
7601 "The call was interrupted by a signal before any data was read; see "
7602 "B<signal>(7)."
7603 msgstr ""
7604
7605 #. type: Plain text
7606 #: build/C/man2/read.2:137
7607 msgid ""
7608 "I<fd> is attached to an object which is unsuitable for reading; or the file "
7609 "was opened with the B<O_DIRECT> flag, and either the address specified in "
7610 "I<buf>, the value specified in I<count>, or the current file offset is not "
7611 "suitably aligned."
7612 msgstr ""
7613
7614 #. type: Plain text
7615 #: build/C/man2/read.2:147
7616 msgid ""
7617 "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size "
7618 "buffer was given to B<read>(); see B<timerfd_create>(2)  for further "
7619 "information."
7620 msgstr ""
7621
7622 #. type: Plain text
7623 #: build/C/man2/read.2:158
7624 msgid ""
7625 "I/O error.  This will happen for example when the process is in a background "
7626 "process group, tries to read from its controlling terminal, and either it is "
7627 "ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may "
7628 "also occur when there is a low-level I/O error while reading from a disk or "
7629 "tape."
7630 msgstr ""
7631
7632 #. type: Plain text
7633 #: build/C/man2/read.2:162
7634 msgid "I<fd> refers to a directory."
7635 msgstr ""
7636
7637 #. type: Plain text
7638 #: build/C/man2/read.2:173
7639 msgid ""
7640 "Other errors may occur, depending on the object connected to I<fd>.  POSIX "
7641 "allows a B<read>()  that is interrupted after reading some data to return -1 "
7642 "(with I<errno> set to B<EINTR>)  or to return the number of bytes already "
7643 "read."
7644 msgstr ""
7645
7646 #. type: Plain text
7647 #: build/C/man2/read.2:187
7648 msgid ""
7649 "On NFS file systems, reading small amounts of data will update the timestamp "
7650 "only the first time, subsequent calls may not do so.  This is caused by "
7651 "client side attribute caching, because most if not all NFS clients leave "
7652 "st_atime (last file access time)  updates to the server and client side "
7653 "reads satisfied from the client's cache will not cause st_atime updates on "
7654 "the server as there are no server side reads.  UNIX semantics can be "
7655 "obtained by disabling client side attribute caching, but in most situations "
7656 "this will substantially increase server load and decrease performance."
7657 msgstr ""
7658
7659 #. type: Plain text
7660 #: build/C/man2/read.2:200
7661 msgid ""
7662 "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), "
7663 "B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), "
7664 "B<fread>(3)"
7665 msgstr ""
7666
7667 #. type: TH
7668 #: build/C/man2/readlink.2:43
7669 #, no-wrap
7670 msgid "READLINK"
7671 msgstr ""
7672
7673 #. type: TH
7674 #: build/C/man2/readlink.2:43
7675 #, no-wrap
7676 msgid "2011-09-20"
7677 msgstr ""
7678
7679 #. type: Plain text
7680 #: build/C/man2/readlink.2:46
7681 msgid "readlink - read value of a symbolic link"
7682 msgstr ""
7683
7684 #. type: Plain text
7685 #: build/C/man2/readlink.2:50
7686 msgid ""
7687 "B<ssize_t readlink(const char *>I<path>B<, char *>I<buf>B<, size_t "
7688 ">I<bufsiz>B<);>"
7689 msgstr ""
7690
7691 #. type: Plain text
7692 #: build/C/man2/readlink.2:58
7693 msgid "B<readlink>():"
7694 msgstr ""
7695
7696 #. type: Plain text
7697 #: build/C/man2/readlink.2:61 build/C/man2/symlink.2:50
7698 msgid ""
7699 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7700 "_XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7701 msgstr ""
7702
7703 #. type: Plain text
7704 #: build/C/man2/readlink.2:77
7705 msgid ""
7706 "B<readlink>()  places the contents of the symbolic link I<path> in the "
7707 "buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a "
7708 "null byte to I<buf>.  It will truncate the contents (to a length of "
7709 "I<bufsiz> characters), in case the buffer is too small to hold all of the "
7710 "contents."
7711 msgstr ""
7712
7713 #. type: Plain text
7714 #: build/C/man2/readlink.2:85
7715 msgid ""
7716 "On success, B<readlink>()  returns the number of bytes placed in I<buf>.  On "
7717 "error, -1 is returned and I<errno> is set to indicate the error."
7718 msgstr ""
7719
7720 #. type: Plain text
7721 #: build/C/man2/readlink.2:91
7722 msgid ""
7723 "Search permission is denied for a component of the path prefix.  (See also "
7724 "B<path_resolution>(7).)"
7725 msgstr ""
7726
7727 #. type: Plain text
7728 #: build/C/man2/readlink.2:95
7729 msgid "I<buf> extends outside the process's allocated address space."
7730 msgstr ""
7731
7732 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
7733 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
7734 #.  and this error can also occur if bufsiz < 0.
7735 #.  See: http://thread.gmane.org/gmane.linux.man/380
7736 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
7737 #. type: Plain text
7738 #: build/C/man2/readlink.2:104
7739 msgid "I<bufsiz> is not positive."
7740 msgstr ""
7741
7742 #. type: Plain text
7743 #: build/C/man2/readlink.2:107
7744 msgid "The named file is not a symbolic link."
7745 msgstr ""
7746
7747 #. type: Plain text
7748 #: build/C/man2/readlink.2:110
7749 msgid "An I/O error occurred while reading from the file system."
7750 msgstr ""
7751
7752 #. type: Plain text
7753 #: build/C/man2/readlink.2:113
7754 msgid "Too many symbolic links were encountered in translating the pathname."
7755 msgstr ""
7756
7757 #. type: Plain text
7758 #: build/C/man2/readlink.2:116
7759 msgid "A pathname, or a component of a pathname, was too long."
7760 msgstr ""
7761
7762 #. type: Plain text
7763 #: build/C/man2/readlink.2:119
7764 msgid "The named file does not exist."
7765 msgstr ""
7766
7767 #. type: Plain text
7768 #: build/C/man2/readlink.2:125
7769 msgid "A component of the path prefix is not a directory."
7770 msgstr ""
7771
7772 #. type: Plain text
7773 #: build/C/man2/readlink.2:130
7774 msgid "4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001."
7775 msgstr ""
7776
7777 #. type: Plain text
7778 #: build/C/man2/readlink.2:138
7779 msgid ""
7780 "In versions of glibc up to and including glibc 2.4, the return type of "
7781 "B<readlink>()  was declared as I<int>.  Nowadays, the return type is "
7782 "declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
7783 msgstr ""
7784
7785 #. type: Plain text
7786 #: build/C/man2/readlink.2:157
7787 msgid ""
7788 "Using a statically sized buffer might not provide enough room for the "
7789 "symbolic link contents.  The required size for the buffer can be obtained "
7790 "from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the "
7791 "link.  However, the number of bytes written by B<readlink>()  should be "
7792 "checked to make sure that the size of the symbolic link did not increase "
7793 "between the calls.  Dynamically allocating the buffer for B<readlink>()  "
7794 "also addresses a common portability problem when using I<PATH_MAX> for the "
7795 "buffer size, as this constant is not guaranteed to be defined per POSIX if "
7796 "the system does not have such limit."
7797 msgstr ""
7798
7799 #. type: Plain text
7800 #: build/C/man2/readlink.2:163
7801 msgid ""
7802 "The following program allocates the buffer needed by B<readlink>()  "
7803 "dynamically from the information provided by B<lstat>(), making sure there's "
7804 "no race condition between the calls."
7805 msgstr ""
7806
7807 #. type: Plain text
7808 #: build/C/man2/readlink.2:170
7809 #, no-wrap
7810 msgid ""
7811 "#include E<lt>sys/types.hE<gt>\n"
7812 "#include E<lt>sys/stat.hE<gt>\n"
7813 "#include E<lt>stdio.hE<gt>\n"
7814 "#include E<lt>stdlib.hE<gt>\n"
7815 "#include E<lt>unistd.hE<gt>\n"
7816 msgstr ""
7817
7818 #. type: Plain text
7819 #: build/C/man2/readlink.2:177
7820 #, no-wrap
7821 msgid ""
7822 "int\n"
7823 "main(int argc, char *argv[])\n"
7824 "{\n"
7825 "    struct stat sb;\n"
7826 "    char *linkname;\n"
7827 "    ssize_t r;\n"
7828 msgstr ""
7829
7830 #. type: Plain text
7831 #: build/C/man2/readlink.2:182
7832 #, no-wrap
7833 msgid ""
7834 "    if (argc != 2) {\n"
7835 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
7836 "        exit(EXIT_FAILURE);\n"
7837 "    }\n"
7838 msgstr ""
7839
7840 #. type: Plain text
7841 #: build/C/man2/readlink.2:187
7842 #, no-wrap
7843 msgid ""
7844 "    if (lstat(argv[1], &sb) == -1) {\n"
7845 "        perror(\"lstat\");\n"
7846 "        exit(EXIT_FAILURE);\n"
7847 "    }\n"
7848 msgstr ""
7849
7850 #. type: Plain text
7851 #: build/C/man2/readlink.2:193
7852 #, no-wrap
7853 msgid ""
7854 "    linkname = malloc(sb.st_size + 1);\n"
7855 "    if (linkname == NULL) {\n"
7856 "        fprintf(stderr, \"insufficient memory\\en\");\n"
7857 "        exit(EXIT_FAILURE);\n"
7858 "    }\n"
7859 msgstr ""
7860
7861 #. type: Plain text
7862 #: build/C/man2/readlink.2:195
7863 #, no-wrap
7864 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
7865 msgstr ""
7866
7867 #. type: Plain text
7868 #: build/C/man2/readlink.2:200
7869 #, no-wrap
7870 msgid ""
7871 "    if (r E<lt> 0) {\n"
7872 "        perror(\"lstat\");\n"
7873 "        exit(EXIT_FAILURE);\n"
7874 "    }\n"
7875 msgstr ""
7876
7877 #. type: Plain text
7878 #: build/C/man2/readlink.2:206
7879 #, no-wrap
7880 msgid ""
7881 "    if (r E<gt> sb.st_size) {\n"
7882 "        fprintf(stderr, \"symlink increased in size \"\n"
7883 "                        \"between lstat() and readlink()\\en\");\n"
7884 "        exit(EXIT_FAILURE);\n"
7885 "    }\n"
7886 msgstr ""
7887
7888 #. type: Plain text
7889 #: build/C/man2/readlink.2:208
7890 #, no-wrap
7891 msgid "    linkname[sb.st_size] = \\(aq\\e0\\(aq;\n"
7892 msgstr ""
7893
7894 #. type: Plain text
7895 #: build/C/man2/readlink.2:210
7896 #, no-wrap
7897 msgid ""
7898 "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], "
7899 "linkname);\n"
7900 msgstr ""
7901
7902 #. type: Plain text
7903 #: build/C/man2/readlink.2:222
7904 msgid ""
7905 "B<readlink>(1), B<lstat>(2), B<readlinkat>(2), B<stat>(2), B<symlink>(2), "
7906 "B<path_resolution>(7), B<symlink>(7)"
7907 msgstr ""
7908
7909 #. type: TH
7910 #: build/C/man2/readv.2:32
7911 #, no-wrap
7912 msgid "READV"
7913 msgstr ""
7914
7915 #. type: TH
7916 #: build/C/man2/readv.2:32
7917 #, no-wrap
7918 msgid "2010-11-17"
7919 msgstr ""
7920
7921 #. type: Plain text
7922 #: build/C/man2/readv.2:35
7923 msgid "readv, writev, preadv, pwritev - read or write data into multiple buffers"
7924 msgstr ""
7925
7926 #. type: Plain text
7927 #: build/C/man2/readv.2:38
7928 #, no-wrap
7929 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
7930 msgstr ""
7931
7932 #. type: Plain text
7933 #: build/C/man2/readv.2:40
7934 #, no-wrap
7935 msgid ""
7936 "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int "
7937 ">I<iovcnt>B<);>\n"
7938 msgstr ""
7939
7940 #. type: Plain text
7941 #: build/C/man2/readv.2:42
7942 #, no-wrap
7943 msgid ""
7944 "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int "
7945 ">I<iovcnt>B<);>\n"
7946 msgstr ""
7947
7948 #. type: Plain text
7949 #: build/C/man2/readv.2:45
7950 #, no-wrap
7951 msgid ""
7952 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int "
7953 ">I<iovcnt>B<,>\n"
7954 "B<               off_t >I<offset>B<);>\n"
7955 msgstr ""
7956
7957 #. type: Plain text
7958 #: build/C/man2/readv.2:48
7959 #, no-wrap
7960 msgid ""
7961 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int "
7962 ">I<iovcnt>B<,>\n"
7963 "B<                off_t >I<offset>B<);>\n"
7964 msgstr ""
7965
7966 #. type: Plain text
7967 #: build/C/man2/readv.2:58
7968 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
7969 msgstr ""
7970
7971 #. type: Plain text
7972 #: build/C/man2/readv.2:68
7973 msgid ""
7974 "The B<readv>()  system call reads I<iovcnt> buffers from the file associated "
7975 "with the file descriptor I<fd> into the buffers described by I<iov> "
7976 "(\"scatter input\")."
7977 msgstr ""
7978
7979 #. type: Plain text
7980 #: build/C/man2/readv.2:78
7981 msgid ""
7982 "The B<writev>()  system call writes I<iovcnt> buffers of data described by "
7983 "I<iov> to the file associated with the file descriptor I<fd> (\"gather "
7984 "output\")."
7985 msgstr ""
7986
7987 #. type: Plain text
7988 #: build/C/man2/readv.2:87
7989 msgid ""
7990 "The pointer I<iov> points to an array of I<iovec> structures, defined in "
7991 "I<E<lt>sys/uio.hE<gt>> as:"
7992 msgstr ""
7993
7994 #. type: Plain text
7995 #: build/C/man2/readv.2:95
7996 #, no-wrap
7997 msgid ""
7998 "struct iovec {\n"
7999 "    void  *iov_base;    /* Starting address */\n"
8000 "    size_t iov_len;     /* Number of bytes to transfer */\n"
8001 "};\n"
8002 msgstr ""
8003
8004 #. type: Plain text
8005 #: build/C/man2/readv.2:103
8006 msgid ""
8007 "The B<readv>()  system call works just like B<read>(2)  except that multiple "
8008 "buffers are filled."
8009 msgstr ""
8010
8011 #. type: Plain text
8012 #: build/C/man2/readv.2:109
8013 msgid ""
8014 "The B<writev>()  system call works just like B<write>(2)  except that "
8015 "multiple buffers are written out."
8016 msgstr ""
8017
8018 #. type: Plain text
8019 #: build/C/man2/readv.2:128
8020 msgid ""
8021 "Buffers are processed in array order.  This means that B<readv>()  "
8022 "completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If "
8023 "there is insufficient data, then not all buffers pointed to by I<iov> may be "
8024 "filled.)  Similarly, B<writev>()  writes out the entire contents of "
8025 "I<iov>[0] before proceeding to I<iov>[1], and so on."
8026 msgstr ""
8027
8028 #. type: Plain text
8029 #: build/C/man2/readv.2:146
8030 msgid ""
8031 "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the "
8032 "data written by B<writev>()  is written as a single block that is not "
8033 "intermingled with output from writes in other processes (but see B<pipe>(7)  "
8034 "for an exception); analogously, B<readv>()  is guaranteed to read a "
8035 "contiguous block of data from the file, regardless of read operations "
8036 "performed in other threads or processes that have file descriptors referring "
8037 "to the same open file description (see B<open>(2))."
8038 msgstr ""
8039
8040 #. type: SS
8041 #: build/C/man2/readv.2:146
8042 #, no-wrap
8043 msgid "preadv() and pwritev()"
8044 msgstr ""
8045
8046 #. type: Plain text
8047 #: build/C/man2/readv.2:159
8048 msgid ""
8049 "The B<preadv>()  system call combines the functionality of B<readv>()  and "
8050 "B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth "
8051 "argument, I<offset>, which specifies the file offset at which the input "
8052 "operation is to be performed."
8053 msgstr ""
8054
8055 #. type: Plain text
8056 #: build/C/man2/readv.2:172
8057 msgid ""
8058 "The B<pwritev>()  system call combines the functionality of B<writev>()  and "
8059 "B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth "
8060 "argument, I<offset>, which specifies the file offset at which the output "
8061 "operation is to be performed."
8062 msgstr ""
8063
8064 #. type: Plain text
8065 #: build/C/man2/readv.2:177
8066 msgid ""
8067 "The file offset is not changed by these system calls.  The file referred to "
8068 "by I<fd> must be capable of seeking."
8069 msgstr ""
8070
8071 #. type: Plain text
8072 #: build/C/man2/readv.2:188
8073 msgid ""
8074 "On success, B<readv>()  and B<preadv>()  return the number of bytes read; "
8075 "B<writev>()  and B<pwritev>()  return the number of bytes written.  On "
8076 "error, -1 is returned, and I<errno> is set appropriately."
8077 msgstr ""
8078
8079 #. type: Plain text
8080 #: build/C/man2/readv.2:200
8081 msgid ""
8082 "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, "
8083 "B<preadv>()  and B<pwritev>()  can also fail for the same reasons as "
8084 "B<lseek>(2).  Additionally, the following error is defined:"
8085 msgstr ""
8086
8087 #. type: Plain text
8088 #: build/C/man2/readv.2:209
8089 msgid ""
8090 "The sum of the I<iov_len> values overflows an I<ssize_t> value.  Or, the "
8091 "vector count I<iovcnt> is less than zero or greater than the permitted "
8092 "maximum."
8093 msgstr ""
8094
8095 #. type: Plain text
8096 #: build/C/man2/readv.2:214
8097 msgid ""
8098 "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library "
8099 "support was added in glibc 2.10."
8100 msgstr ""
8101
8102 #.  The readv/writev system calls were buggy before Linux 1.3.40.
8103 #.  (Says release.libc.)
8104 #. type: Plain text
8105 #: build/C/man2/readv.2:222
8106 msgid ""
8107 "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in "
8108 "4.2BSD), POSIX.1-2001.  Linux libc5 used I<size_t> as the type of the "
8109 "I<iovcnt> argument, and I<int> as the return type."
8110 msgstr ""
8111
8112 #. type: Plain text
8113 #: build/C/man2/readv.2:226
8114 msgid "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
8115 msgstr ""
8116
8117 #. type: SS
8118 #: build/C/man2/readv.2:227
8119 #, no-wrap
8120 msgid "Linux notes"
8121 msgstr ""
8122
8123 #. type: Plain text
8124 #: build/C/man2/readv.2:258
8125 msgid ""
8126 "POSIX.1-2001 allows an implementation to place a limit on the number of "
8127 "items that can be passed in I<iov>.  An implementation can advertise its "
8128 "limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the "
8129 "return value from I<sysconf(_SC_IOV_MAX)>.  On Linux, the limit advertised "
8130 "by these mechanisms is 1024, which is the true kernel limit.  However, the "
8131 "glibc wrapper functions do some extra work if they detect that the "
8132 "underlying kernel system call failed because this limit was exceeded.  In "
8133 "the case of B<readv>()  the wrapper function allocates a temporary buffer "
8134 "large enough for all of the items specified by I<iov>, passes that buffer in "
8135 "a call to B<read>(2), copies data from the buffer to the locations specified "
8136 "by the I<iov_base> fields of the elements of I<iov>, and then frees the "
8137 "buffer.  The wrapper function for B<writev>()  performs the analogous task "
8138 "using a temporary buffer and a call to B<write>(2)."
8139 msgstr ""
8140
8141 #. type: Plain text
8142 #: build/C/man2/readv.2:265
8143 msgid ""
8144 "It is not advisable to mix calls to B<readv>()  or B<writev>(), which "
8145 "operate on file descriptors, with the functions from the stdio library; the "
8146 "results will be undefined and probably not what you want."
8147 msgstr ""
8148
8149 #. type: Plain text
8150 #: build/C/man2/readv.2:268
8151 msgid "The following code sample demonstrates the use of B<writev>():"
8152 msgstr ""
8153
8154 #. type: Plain text
8155 #: build/C/man2/readv.2:275
8156 #, no-wrap
8157 msgid ""
8158 "char *str0 = \"hello \";\n"
8159 "char *str1 = \"world\\en\";\n"
8160 "struct iovec iov[2];\n"
8161 "ssize_t nwritten;\n"
8162 msgstr ""
8163
8164 #. type: Plain text
8165 #: build/C/man2/readv.2:280
8166 #, no-wrap
8167 msgid ""
8168 "iov[0].iov_base = str0;\n"
8169 "iov[0].iov_len = strlen(str0);\n"
8170 "iov[1].iov_base = str1;\n"
8171 "iov[1].iov_len = strlen(str1);\n"
8172 msgstr ""
8173
8174 #. type: Plain text
8175 #: build/C/man2/readv.2:282
8176 #, no-wrap
8177 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
8178 msgstr ""
8179
8180 #. type: Plain text
8181 #: build/C/man2/readv.2:288
8182 msgid "B<pread>(2), B<read>(2), B<write>(2)"
8183 msgstr ""
8184
8185 #. type: TH
8186 #: build/C/man3/remove.3:31
8187 #, no-wrap
8188 msgid "REMOVE"
8189 msgstr ""
8190
8191 #. type: TH
8192 #: build/C/man3/remove.3:31
8193 #, no-wrap
8194 msgid "2008-12-03"
8195 msgstr ""
8196
8197 #. type: Plain text
8198 #: build/C/man3/remove.3:34
8199 msgid "remove - remove a file or directory"
8200 msgstr ""
8201
8202 #. type: Plain text
8203 #: build/C/man3/remove.3:38
8204 msgid "B<int remove(const char *>I<pathname>B<);>"
8205 msgstr ""
8206
8207 #. type: Plain text
8208 #: build/C/man3/remove.3:46
8209 msgid ""
8210 "B<remove>()  deletes a name from the file system.  It calls B<unlink>(2)  "
8211 "for files, and B<rmdir>(2)  for directories."
8212 msgstr ""
8213
8214 #. type: Plain text
8215 #: build/C/man3/remove.3:50
8216 msgid ""
8217 "If the removed name was the last link to a file and no processes have the "
8218 "file open, the file is deleted and the space it was using is made available "
8219 "for reuse."
8220 msgstr ""
8221
8222 #. type: Plain text
8223 #: build/C/man3/remove.3:55
8224 msgid ""
8225 "If the name was the last link to a file, but any processes still have the "
8226 "file open, the file will remain in existence until the last file descriptor "
8227 "referring to it is closed."
8228 msgstr ""
8229
8230 #. type: Plain text
8231 #: build/C/man3/remove.3:57
8232 msgid "If the name referred to a symbolic link, the link is removed."
8233 msgstr ""
8234
8235 #. type: Plain text
8236 #: build/C/man3/remove.3:60
8237 msgid ""
8238 "If the name referred to a socket, FIFO, or device, the name is removed, but "
8239 "processes which have the object open may continue to use it."
8240 msgstr ""
8241
8242 #. type: Plain text
8243 #: build/C/man3/remove.3:70
8244 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
8245 msgstr ""
8246
8247 #. type: Plain text
8248 #: build/C/man3/remove.3:72
8249 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
8250 msgstr ""
8251
8252 #. type: Plain text
8253 #: build/C/man3/remove.3:78
8254 msgid ""
8255 "Under libc4 and libc5, B<remove>()  was an alias for B<unlink>(2)  (and "
8256 "hence would not remove directories)."
8257 msgstr ""
8258
8259 #. type: Plain text
8260 #: build/C/man3/remove.3:81 build/C/man2/unlink.2:148
8261 msgid ""
8262 "Infelicities in the protocol underlying NFS can cause the unexpected "
8263 "disappearance of files which are still being used."
8264 msgstr ""
8265
8266 #. type: Plain text
8267 #: build/C/man3/remove.3:92
8268 msgid ""
8269 "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
8270 "B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
8271 msgstr ""
8272
8273 #. type: TH
8274 #: build/C/man2/rename.2:32
8275 #, no-wrap
8276 msgid "RENAME"
8277 msgstr ""
8278
8279 #. type: Plain text
8280 #: build/C/man2/rename.2:35
8281 msgid "rename - change the name or location of a file"
8282 msgstr ""
8283
8284 #. type: Plain text
8285 #: build/C/man2/rename.2:39
8286 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
8287 msgstr ""
8288
8289 #. type: Plain text
8290 #: build/C/man2/rename.2:48
8291 msgid ""
8292 "B<rename>()  renames a file, moving it between directories if required.  Any "
8293 "other hard links to the file (as created using B<link>(2))  are unaffected.  "
8294 "Open file descriptors for I<oldpath> are also unaffected."
8295 msgstr ""
8296
8297 #. type: Plain text
8298 #: build/C/man2/rename.2:56
8299 msgid ""
8300 "If I<newpath> already exists it will be atomically replaced (subject to a "
8301 "few conditions; see ERRORS below), so that there is no point at which "
8302 "another process attempting to access I<newpath> will find it missing."
8303 msgstr ""
8304
8305 #. type: Plain text
8306 #: build/C/man2/rename.2:64
8307 msgid ""
8308 "If I<oldpath> and I<newpath> are existing hard links referring to the same "
8309 "file, then B<rename>()  does nothing, and returns a success status."
8310 msgstr ""
8311
8312 #. type: Plain text
8313 #: build/C/man2/rename.2:72
8314 msgid ""
8315 "If I<newpath> exists but the operation fails for some reason B<rename>()  "
8316 "guarantees to leave an instance of I<newpath> in place."
8317 msgstr ""
8318
8319 #. type: Plain text
8320 #: build/C/man2/rename.2:78
8321 msgid ""
8322 "I<oldpath> can specify a directory.  In this case, I<newpath> must either "
8323 "not exist, or it must specify an empty directory."
8324 msgstr ""
8325
8326 #. type: Plain text
8327 #: build/C/man2/rename.2:85
8328 msgid ""
8329 "However, when overwriting there will probably be a window in which both "
8330 "I<oldpath> and I<newpath> refer to the file being renamed."
8331 msgstr ""
8332
8333 #. type: Plain text
8334 #: build/C/man2/rename.2:91
8335 msgid ""
8336 "If I<oldpath> refers to a symbolic link the link is renamed; if I<newpath> "
8337 "refers to a symbolic link the link will be overwritten."
8338 msgstr ""
8339
8340 #. type: Plain text
8341 #: build/C/man2/rename.2:116
8342 msgid ""
8343 "Write permission is denied for the directory containing I<oldpath> or "
8344 "I<newpath>, or, search permission is denied for one of the directories in "
8345 "the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory "
8346 "and does not allow write permission (needed to update the I<..> entry).  "
8347 "(See also B<path_resolution>(7).)"
8348 msgstr ""
8349
8350 #. type: TP
8351 #: build/C/man2/rename.2:116 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:71
8352 #, no-wrap
8353 msgid "B<EBUSY>"
8354 msgstr ""
8355
8356 #. type: Plain text
8357 #: build/C/man2/rename.2:133
8358 msgid ""
8359 "The rename fails because I<oldpath> or I<newpath> is a directory that is in "
8360 "use by some process (perhaps as current working directory, or as root "
8361 "directory, or because it was open for reading) or is in use by the system "
8362 "(for example as mount point), while the system considers this an error.  "
8363 "(Note that there is no requirement to return B<EBUSY> in such "
8364 "cases\\(emthere is nothing wrong with doing the rename anyway\\(embut it is "
8365 "allowed to return B<EBUSY> if the system cannot otherwise handle such "
8366 "situations.)"
8367 msgstr ""
8368
8369 #. type: Plain text
8370 #: build/C/man2/rename.2:143
8371 msgid ""
8372 "The new pathname contained a path prefix of the old, or, more generally, an "
8373 "attempt was made to make a directory a subdirectory of itself."
8374 msgstr ""
8375
8376 #. type: Plain text
8377 #: build/C/man2/rename.2:149
8378 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
8379 msgstr ""
8380
8381 #. type: Plain text
8382 #: build/C/man2/rename.2:160
8383 msgid ""
8384 "I<oldpath> already has the maximum number of links to it, or it was a "
8385 "directory and the directory containing I<newpath> has the maximum number of "
8386 "links."
8387 msgstr ""
8388
8389 #. type: Plain text
8390 #: build/C/man2/rename.2:176
8391 msgid ""
8392 "The link named by I<oldpath> does not exist; or, a directory component in "
8393 "I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
8394 msgstr ""
8395
8396 #. type: Plain text
8397 #: build/C/man2/rename.2:193
8398 msgid ""
8399 "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, "
8400 "a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is "
8401 "not a directory."
8402 msgstr ""
8403
8404 #. type: TP
8405 #: build/C/man2/rename.2:193
8406 #, no-wrap
8407 msgid "B<ENOTEMPTY> or B<EEXIST>"
8408 msgstr ""
8409
8410 #. type: Plain text
8411 #: build/C/man2/rename.2:197
8412 msgid ""
8413 "I<newpath> is a nonempty directory, that is, contains entries other than "
8414 "\".\" and \"..\"."
8415 msgstr ""
8416
8417 #. type: TP
8418 #: build/C/man2/rename.2:197 build/C/man2/unlink.2:126
8419 #, no-wrap
8420 msgid "B<EPERM> or B<EACCES>"
8421 msgstr ""
8422
8423 #. type: Plain text
8424 #: build/C/man2/rename.2:221
8425 msgid ""
8426 "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and "
8427 "the process's effective user ID is neither the user ID of the file to be "
8428 "deleted nor that of the directory containing it, and the process is not "
8429 "privileged (Linux: does not have the B<CAP_FOWNER> capability); or "
8430 "I<newpath> is an existing file and the directory containing it has the "
8431 "sticky bit set and the process's effective user ID is neither the user ID of "
8432 "the file to be replaced nor that of the directory containing it, and the "
8433 "process is not privileged (Linux: does not have the B<CAP_FOWNER> "
8434 "capability); or the file system containing I<pathname> does not support "
8435 "renaming of the type requested."
8436 msgstr ""
8437
8438 #. type: Plain text
8439 #: build/C/man2/rename.2:232
8440 msgid ""
8441 "I<oldpath> and I<newpath> are not on the same mounted file system.  (Linux "
8442 "permits a file system to be mounted at multiple points, but B<rename>()  "
8443 "does not work across different mount points, even if the same file system is "
8444 "mounted on both.)"
8445 msgstr ""
8446
8447 #. type: Plain text
8448 #: build/C/man2/rename.2:234
8449 msgid "4.3BSD, C89, C99, POSIX.1-2001."
8450 msgstr ""
8451
8452 #. type: Plain text
8453 #: build/C/man2/rename.2:245
8454 msgid ""
8455 "On NFS file systems, you can not assume that if the operation failed the "
8456 "file was not renamed.  If the server does the rename operation and then "
8457 "crashes, the retransmitted RPC which will be processed when the server is up "
8458 "again causes a failure.  The application is expected to deal with this.  See "
8459 "B<link>(2)  for a similar problem."
8460 msgstr ""
8461
8462 #. type: Plain text
8463 #: build/C/man2/rename.2:254
8464 msgid ""
8465 "B<mv>(1), B<chmod>(2), B<link>(2), B<renameat>(2), B<symlink>(2), "
8466 "B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
8467 msgstr ""
8468
8469 #. type: TH
8470 #: build/C/man2/rmdir.2:30
8471 #, no-wrap
8472 msgid "RMDIR"
8473 msgstr ""
8474
8475 #. type: TH
8476 #: build/C/man2/rmdir.2:30
8477 #, no-wrap
8478 msgid "2008-05-08"
8479 msgstr ""
8480
8481 #. type: Plain text
8482 #: build/C/man2/rmdir.2:33
8483 msgid "rmdir - delete a directory"
8484 msgstr ""
8485
8486 #. type: Plain text
8487 #: build/C/man2/rmdir.2:37
8488 msgid "B<int rmdir(const char *>I<pathname>B<);>"
8489 msgstr ""
8490
8491 #. type: Plain text
8492 #: build/C/man2/rmdir.2:40
8493 msgid "B<rmdir>()  deletes a directory, which must be empty."
8494 msgstr ""
8495
8496 #. type: Plain text
8497 #: build/C/man2/rmdir.2:55
8498 msgid ""
8499 "Write access to the directory containing I<pathname> was not allowed, or one "
8500 "of the directories in the path prefix of I<pathname> did not allow search "
8501 "permission.  (See also B<path_resolution>(7)."
8502 msgstr ""
8503
8504 #. type: Plain text
8505 #: build/C/man2/rmdir.2:64
8506 msgid ""
8507 "I<pathname> is currently in use by the system or some process that prevents "
8508 "its removal.  On Linux this means I<pathname> is currently used as a mount "
8509 "point or is the root directory of the calling process."
8510 msgstr ""
8511
8512 #. type: Plain text
8513 #: build/C/man2/rmdir.2:73
8514 msgid "I<pathname> has I<.> as last component."
8515 msgstr ""
8516
8517 #. type: Plain text
8518 #: build/C/man2/rmdir.2:77
8519 msgid "Too many symbolic links were encountered in resolving I<pathname>."
8520 msgstr ""
8521
8522 #. type: Plain text
8523 #: build/C/man2/rmdir.2:85
8524 msgid ""
8525 "A directory component in I<pathname> does not exist or is a dangling "
8526 "symbolic link."
8527 msgstr ""
8528
8529 #. type: Plain text
8530 #: build/C/man2/rmdir.2:94
8531 msgid ""
8532 "I<pathname>, or a component used as a directory in I<pathname>, is not, in "
8533 "fact, a directory."
8534 msgstr ""
8535
8536 #. type: TP
8537 #: build/C/man2/rmdir.2:94
8538 #, no-wrap
8539 msgid "B<ENOTEMPTY>"
8540 msgstr ""
8541
8542 #. type: Plain text
8543 #: build/C/man2/rmdir.2:107
8544 msgid ""
8545 "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has "
8546 "I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this "
8547 "condition."
8548 msgstr ""
8549
8550 #. type: Plain text
8551 #: build/C/man2/rmdir.2:118
8552 msgid ""
8553 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
8554 "and the process's effective user ID is neither the user ID of the file to be "
8555 "deleted nor that of the directory containing it, and the process is not "
8556 "privileged (Linux: does not have the B<CAP_FOWNER> capability)."
8557 msgstr ""
8558
8559 #. type: Plain text
8560 #: build/C/man2/rmdir.2:123
8561 msgid ""
8562 "The file system containing I<pathname> does not support the removal of "
8563 "directories."
8564 msgstr ""
8565
8566 #. type: Plain text
8567 #: build/C/man2/rmdir.2:127
8568 msgid "I<pathname> refers to a directory on a read-only file system."
8569 msgstr ""
8570
8571 #. type: Plain text
8572 #: build/C/man2/rmdir.2:132
8573 msgid ""
8574 "Infelicities in the protocol underlying NFS can cause the unexpected "
8575 "disappearance of directories which are still being used."
8576 msgstr ""
8577
8578 #. type: Plain text
8579 #: build/C/man2/rmdir.2:141
8580 msgid ""
8581 "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), "
8582 "B<unlink>(2), B<unlinkat>(2)"
8583 msgstr ""
8584
8585 #. type: TH
8586 #: build/C/man3/scanf.3:52
8587 #, no-wrap
8588 msgid "SCANF"
8589 msgstr ""
8590
8591 #. type: TH
8592 #: build/C/man3/scanf.3:52
8593 #, no-wrap
8594 msgid "2013-01-30"
8595 msgstr ""
8596
8597 #. type: Plain text
8598 #: build/C/man3/scanf.3:55
8599 msgid "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
8600 msgstr ""
8601
8602 #. type: Plain text
8603 #: build/C/man3/scanf.3:62
8604 #, no-wrap
8605 msgid ""
8606 "B<int scanf(const char *>I<format>B<, ...);>\n"
8607 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
8608 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
8609 msgstr ""
8610
8611 #. type: Plain text
8612 #: build/C/man3/scanf.3:64
8613 #, no-wrap
8614 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
8615 msgstr ""
8616
8617 #. type: Plain text
8618 #: build/C/man3/scanf.3:68
8619 #, no-wrap
8620 msgid ""
8621 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
8622 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list "
8623 ">I<ap>B<);>\n"
8624 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list "
8625 ">I<ap>B<);>\n"
8626 msgstr ""
8627
8628 #. type: Plain text
8629 #: build/C/man3/scanf.3:79
8630 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
8631 msgstr ""
8632
8633 #. type: Plain text
8634 #: build/C/man3/scanf.3:82
8635 msgid ""
8636 "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ "
8637 "200112L;"
8638 msgstr ""
8639
8640 #. type: Plain text
8641 #: build/C/man3/scanf.3:104
8642 msgid ""
8643 "The B<scanf>()  family of functions scans input according to I<format> as "
8644 "described below.  This format may contain I<conversion specifications>; the "
8645 "results from such conversions, if any, are stored in the locations pointed "
8646 "to by the I<pointer> arguments that follow I<format>.  Each I<pointer> "
8647 "argument must be of a type that is appropriate for the value returned by the "
8648 "corresponding conversion specification."
8649 msgstr ""
8650
8651 #. type: Plain text
8652 #: build/C/man3/scanf.3:115
8653 msgid ""
8654 "If the number of conversion specifications in I<format> exceeds the number "
8655 "of I<pointer> arguments, the results are undefined.  If the number of "
8656 "I<pointer> arguments exceeds the number of conversion specifications, then "
8657 "the excess I<pointer> arguments are evaluated, but are otherwise ignored."
8658 msgstr ""
8659
8660 #. type: Plain text
8661 #: build/C/man3/scanf.3:127
8662 msgid ""
8663 "The B<scanf>()  function reads input from the standard input stream "
8664 "I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and "
8665 "B<sscanf>()  reads its input from the character string pointed to by I<str>."
8666 msgstr ""
8667
8668 #. type: Plain text
8669 #: build/C/man3/scanf.3:145
8670 msgid ""
8671 "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input "
8672 "from the stream pointer I<stream> using a variable argument list of pointers "
8673 "(see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list "
8674 "from the standard input and the B<vsscanf>()  function scans it from a "
8675 "string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  "
8676 "functions respectively."
8677 msgstr ""
8678
8679 #. type: Plain text
8680 #: build/C/man3/scanf.3:159
8681 msgid ""
8682 "The I<format> string consists of a sequence of I<directives> which describe "
8683 "how to process the sequence of input characters.  If processing of a "
8684 "directive fails, no further input is read, and B<scanf>()  returns.  A "
8685 "\"failure\" can be either of the following: I<input failure>, meaning that "
8686 "input characters were unavailable, or I<matching failure>, meaning that the "
8687 "input was inappropriate (see below)."
8688 msgstr ""
8689
8690 #. type: Plain text
8691 #: build/C/man3/scanf.3:161
8692 msgid "A directive is one of the following:"
8693 msgstr ""
8694
8695 #. type: TP
8696 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171 build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220 build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
8697 #, no-wrap
8698 msgid "\\(bu"
8699 msgstr ""
8700
8701 #. type: Plain text
8702 #: build/C/man3/scanf.3:167
8703 msgid ""
8704 "A sequence of white-space characters (space, tab, newline, etc.; see "
8705 "B<isspace>(3)).  This directive matches any amount of white space, including "
8706 "none, in the input."
8707 msgstr ""
8708
8709 #. type: Plain text
8710 #: build/C/man3/scanf.3:171
8711 msgid ""
8712 "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  "
8713 "This character must exactly match the next character of input."
8714 msgstr ""
8715
8716 #. type: Plain text
8717 #: build/C/man3/scanf.3:182
8718 msgid ""
8719 "A conversion specification, which commences with a \\(aq%\\(aq (percent) "
8720 "character.  A sequence of characters from the input is converted according "
8721 "to this specification, and the result is placed in the corresponding "
8722 "I<pointer> argument.  If the next item of input does not match the "
8723 "conversion specification, the conversion fails\\(emthis is a I<matching "
8724 "failure>."
8725 msgstr ""
8726
8727 #. type: Plain text
8728 #: build/C/man3/scanf.3:190
8729 msgid ""
8730 "Each I<conversion specification> in I<format> begins with either the "
8731 "character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below "
8732 "for the distinction) followed by:"
8733 msgstr ""
8734
8735 #. type: Plain text
8736 #: build/C/man3/scanf.3:201
8737 msgid ""
8738 "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads "
8739 "input as directed by the conversion specification, but discards the input.  "
8740 "No corresponding I<pointer> argument is required, and this specification is "
8741 "not included in the count of successful assignments returned by B<scanf>()."
8742 msgstr ""
8743
8744 #. type: Plain text
8745 #: build/C/man3/scanf.3:220
8746 msgid ""
8747 "An optional \\(aqm\\(aq character.  This is used with string conversions "
8748 "(I<%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a "
8749 "corresponding buffer to hold the input: instead, B<scanf>()  allocates a "
8750 "buffer of sufficient size, and assigns the address of this buffer to the "
8751 "corresponding I<pointer> argument, which should be a pointer to a I<char\\ "
8752 "*> variable (this variable does not need to be initialized before the "
8753 "call).  The caller should subsequently B<free>(3)  this buffer when it is no "
8754 "longer required."
8755 msgstr ""
8756
8757 #. type: Plain text
8758 #: build/C/man3/scanf.3:232
8759 msgid ""
8760 "An optional decimal integer which specifies the I<maximum field width>.  "
8761 "Reading of characters stops either when this maximum is reached or when a "
8762 "nonmatching character is found, whichever happens first.  Most conversions "
8763 "discard initial white space characters (the exceptions are noted below), and "
8764 "these discarded characters don't count toward the maximum field width.  "
8765 "String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to "
8766 "mark the end of the input; the maximum field width does not include this "
8767 "terminator."
8768 msgstr ""
8769
8770 #. type: Plain text
8771 #: build/C/man3/scanf.3:246
8772 msgid ""
8773 "An optional I<type modifier character>.  For example, the B<l> type modifier "
8774 "is used with integer conversions such as B<%d> to specify that the "
8775 "corresponding I<pointer> argument refers to a I<long int> rather than a "
8776 "pointer to an I<int>."
8777 msgstr ""
8778
8779 #. type: Plain text
8780 #: build/C/man3/scanf.3:251
8781 msgid ""
8782 "A I<conversion specifier> that specifies the type of input conversion to be "
8783 "performed."
8784 msgstr ""
8785
8786 #. type: Plain text
8787 #: build/C/man3/scanf.3:280
8788 msgid ""
8789 "The conversion specifications in I<format> are of two forms, either "
8790 "beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two "
8791 "forms should not be mixed in the same I<format> string, except that a string "
8792 "containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If "
8793 "I<format> contains \\(aq%\\(aq specifications then these correspond in order "
8794 "with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which "
8795 "is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that "
8796 "specifies that the converted input should be placed in the location referred "
8797 "to by the I<n>-th I<pointer> argument following I<format>."
8798 msgstr ""
8799
8800 #. type: SS
8801 #: build/C/man3/scanf.3:280
8802 #, no-wrap
8803 msgid "Conversions"
8804 msgstr ""
8805
8806 #. type: Plain text
8807 #: build/C/man3/scanf.3:284
8808 msgid ""
8809 "The following I<type modifier characters> can appear in a conversion "
8810 "specification:"
8811 msgstr ""
8812
8813 #. type: Plain text
8814 #: build/C/man3/scanf.3:294
8815 msgid ""
8816 "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, "
8817 "B<X>, or B<n> and the next pointer is a pointer to a I<short int> or "
8818 "I<unsigned short int> (rather than I<int>)."
8819 msgstr ""
8820
8821 #. type: Plain text
8822 #: build/C/man3/scanf.3:302
8823 msgid ""
8824 "As for B<h>, but the next pointer is a pointer to a I<signed char> or "
8825 "I<unsigned char>."
8826 msgstr ""
8827
8828 #. type: Plain text
8829 #: build/C/man3/scanf.3:311
8830 msgid ""
8831 "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a "
8832 "I<uintmax_t>.  This modifier was introduced in C99."
8833 msgstr ""
8834
8835 #.  This use of l was introduced in Amendment 1 to ISO C90.
8836 #. type: Plain text
8837 #: build/C/man3/scanf.3:338
8838 msgid ""
8839 "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, "
8840 "B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or "
8841 "I<unsigned long int> (rather than I<int>), or that the conversion will be "
8842 "one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> "
8843 "(rather than I<float>).  Specifying two B<l> characters is equivalent to "
8844 "B<L>.  If used with B<%c> or B<%s> the corresponding parameter is considered "
8845 "as a pointer to a wide character or wide-character string respectively."
8846 msgstr ""
8847
8848 #.  MTK, Jul 05: The following is no longer true for modern
8849 #.  ANSI C (i.e., C99):
8850 #.  (Note that long long is not an
8851 #.  ANSI C
8852 #.  type. Any program using this will not be portable to all
8853 #.  architectures).
8854 #. type: Plain text
8855 #: build/C/man3/scanf.3:354
8856 msgid ""
8857 "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the "
8858 "next pointer is a pointer to I<long double> or the conversion will be B<d>, "
8859 "B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
8860 msgstr ""
8861
8862 #. type: Plain text
8863 #: build/C/man3/scanf.3:359
8864 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
8865 msgstr ""
8866
8867 #. type: Plain text
8868 #: build/C/man3/scanf.3:366
8869 msgid ""
8870 "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This "
8871 "modifier was introduced in C99."
8872 msgstr ""
8873
8874 #. type: Plain text
8875 #: build/C/man3/scanf.3:373
8876 msgid ""
8877 "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This "
8878 "modifier was introduced in C99."
8879 msgstr ""
8880
8881 #. type: Plain text
8882 #: build/C/man3/scanf.3:377
8883 msgid "The following I<conversion specifiers> are available:"
8884 msgstr ""
8885
8886 #. type: Plain text
8887 #: build/C/man3/scanf.3:386
8888 msgid ""
8889 "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string "
8890 "matches a single input \\(aq%\\(aq character.  No conversion is done (but "
8891 "initial white space characters are discarded), and assignment does not "
8892 "occur."
8893 msgstr ""
8894
8895 #. type: TP
8896 #: build/C/man3/scanf.3:386
8897 #, no-wrap
8898 msgid "B<d>"
8899 msgstr ""
8900
8901 #. type: Plain text
8902 #: build/C/man3/scanf.3:391
8903 msgid ""
8904 "Matches an optionally signed decimal integer; the next pointer must be a "
8905 "pointer to I<int>."
8906 msgstr ""
8907
8908 #. type: TP
8909 #: build/C/man3/scanf.3:391
8910 #, no-wrap
8911 msgid "B<D>"
8912 msgstr ""
8913
8914 #. type: Plain text
8915 #: build/C/man3/scanf.3:400
8916 msgid ""
8917 "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: "
8918 "thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, "
8919 "causing old programs to fail mysteriously.)"
8920 msgstr ""
8921
8922 #. type: TP
8923 #: build/C/man3/scanf.3:400
8924 #, no-wrap
8925 msgid "B<i>"
8926 msgstr ""
8927
8928 #. type: Plain text
8929 #: build/C/man3/scanf.3:412
8930 msgid ""
8931 "Matches an optionally signed integer; the next pointer must be a pointer to "
8932 "I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in "
8933 "base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters "
8934 "that correspond to the base are used."
8935 msgstr ""
8936
8937 #. type: TP
8938 #: build/C/man3/scanf.3:412
8939 #, no-wrap
8940 msgid "B<o>"
8941 msgstr ""
8942
8943 #. type: Plain text
8944 #: build/C/man3/scanf.3:416
8945 msgid ""
8946 "Matches an unsigned octal integer; the next pointer must be a pointer to "
8947 "I<unsigned int>."
8948 msgstr ""
8949
8950 #. type: TP
8951 #: build/C/man3/scanf.3:416
8952 #, no-wrap
8953 msgid "B<u>"
8954 msgstr ""
8955
8956 #. type: Plain text
8957 #: build/C/man3/scanf.3:421
8958 msgid ""
8959 "Matches an unsigned decimal integer; the next pointer must be a pointer to "
8960 "I<unsigned int>."
8961 msgstr ""
8962
8963 #. type: Plain text
8964 #: build/C/man3/scanf.3:426
8965 msgid ""
8966 "Matches an unsigned hexadecimal integer; the next pointer must be a pointer "
8967 "to I<unsigned int>."
8968 msgstr ""
8969
8970 #. type: TP
8971 #: build/C/man3/scanf.3:426
8972 #, no-wrap
8973 msgid "B<X>"
8974 msgstr ""
8975
8976 #. type: Plain text
8977 #: build/C/man3/scanf.3:430
8978 msgid "Equivalent to B<x>."
8979 msgstr ""
8980
8981 #. type: TP
8982 #: build/C/man3/scanf.3:430
8983 #, no-wrap
8984 msgid "B<f>"
8985 msgstr ""
8986
8987 #. type: Plain text
8988 #: build/C/man3/scanf.3:435
8989 msgid ""
8990 "Matches an optionally signed floating-point number; the next pointer must be "
8991 "a pointer to I<float>."
8992 msgstr ""
8993
8994 #. type: TP
8995 #: build/C/man3/scanf.3:435
8996 #, no-wrap
8997 msgid "B<e>"
8998 msgstr ""
8999
9000 #. type: Plain text
9001 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
9002 msgid "Equivalent to B<f>."
9003 msgstr ""
9004
9005 #. type: TP
9006 #: build/C/man3/scanf.3:439
9007 #, no-wrap
9008 msgid "B<g>"
9009 msgstr ""
9010
9011 #. type: TP
9012 #: build/C/man3/scanf.3:443
9013 #, no-wrap
9014 msgid "B<E>"
9015 msgstr ""
9016
9017 #. type: Plain text
9018 #: build/C/man3/scanf.3:451
9019 msgid "(C99) Equivalent to B<f>."
9020 msgstr ""
9021
9022 #. type: Plain text
9023 #: build/C/man3/scanf.3:459
9024 msgid ""
9025 "Matches a sequence of non-white-space characters; the next pointer must be a "
9026 "pointer to character array that is long enough to hold the input sequence "
9027 "and the terminating null byte (\\(aq\\e0\\(aq), which is added "
9028 "automatically.  The input string stops at white space or at the maximum "
9029 "field width, whichever occurs first."
9030 msgstr ""
9031
9032 #. type: Plain text
9033 #: build/C/man3/scanf.3:469
9034 msgid ""
9035 "Matches a sequence of characters whose length is specified by the I<maximum "
9036 "field width> (default 1); the next pointer must be a pointer to I<char>, and "
9037 "there must be enough room for all the characters (no terminating null byte "
9038 "is added).  The usual skip of leading white space is suppressed.  To skip "
9039 "white space first, use an explicit space in the format."
9040 msgstr ""
9041
9042 #. type: TP
9043 #: build/C/man3/scanf.3:469
9044 #, no-wrap
9045 msgid "B<\\&[>"
9046 msgstr ""
9047
9048 #. type: Plain text
9049 #: build/C/man3/scanf.3:502
9050 msgid ""
9051 "Matches a nonempty sequence of characters from the specified set of accepted "
9052 "characters; the next pointer must be a pointer to I<char>, and there must be "
9053 "enough room for all the characters in the string, plus a terminating null "
9054 "byte.  The usual skip of leading white space is suppressed.  The string is "
9055 "to be made up of characters in (or not in) a particular set; the set is "
9056 "defined by the characters between the open bracket B<[> character and a "
9057 "close bracket B<]> character.  The set I<excludes> those characters if the "
9058 "first character after the open bracket is a circumflex (B<^>).  To include a "
9059 "close bracket in the set, make it the first character after the open bracket "
9060 "or the circumflex; any other position will end the set.  The hyphen "
9061 "character B<-> is also special; when placed between two other characters, it "
9062 "adds all intervening characters to the set.  To include a hyphen, make it "
9063 "the last character before the final close bracket.  For instance, "
9064 "B<[^]0-9-]> means the set \"everything except close bracket, zero through "
9065 "nine, and hyphen\".  The string ends with the appearance of a character not "
9066 "in the (or, with a circumflex, in) set or when the field width runs out."
9067 msgstr ""
9068
9069 #. type: Plain text
9070 #: build/C/man3/scanf.3:510
9071 msgid ""
9072 "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next "
9073 "pointer must be a pointer to a pointer to I<void>."
9074 msgstr ""
9075
9076 #. type: Plain text
9077 #: build/C/man3/scanf.3:530
9078 msgid ""
9079 "Nothing is expected; instead, the number of characters consumed thus far "
9080 "from the input is stored through the next pointer, which must be a pointer "
9081 "to I<int>.  This is I<not> a conversion, although it can be suppressed with "
9082 "the B<*> assignment-suppression character.  The C standard says: \"Execution "
9083 "of a B<%n> directive does not increment the assignment count returned at the "
9084 "completion of execution\" but the Corrigendum seems to contradict this.  "
9085 "Probably it is wise not to make any assumptions on the effect of B<%n> "
9086 "conversions on the return value."
9087 msgstr ""
9088
9089 #. type: Plain text
9090 #: build/C/man3/scanf.3:535
9091 msgid ""
9092 "These functions return the number of input items successfully matched and "
9093 "assigned, which can be fewer than provided for, or even zero in the event of "
9094 "an early matching failure."
9095 msgstr ""
9096
9097 #. type: Plain text
9098 #: build/C/man3/scanf.3:547
9099 msgid ""
9100 "The value B<EOF> is returned if the end of input is reached before either "
9101 "the first successful conversion or a matching failure occurs.  B<EOF> is "
9102 "also returned if a read error occurs, in which case the error indicator for "
9103 "the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the "
9104 "error."
9105 msgstr ""
9106
9107 #. type: Plain text
9108 #: build/C/man3/scanf.3:553
9109 msgid ""
9110 "The file descriptor underlying I<stream> is marked nonblocking, and the read "
9111 "operation would block."
9112 msgstr ""
9113
9114 #. type: Plain text
9115 #: build/C/man3/scanf.3:558
9116 msgid ""
9117 "The file descriptor underlying I<stream> is invalid, or not open for "
9118 "reading."
9119 msgstr ""
9120
9121 #. type: Plain text
9122 #: build/C/man3/scanf.3:561
9123 msgid "Input byte sequence does not form a valid character."
9124 msgstr ""
9125
9126 #. type: Plain text
9127 #: build/C/man3/scanf.3:565
9128 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
9129 msgstr ""
9130
9131 #. type: Plain text
9132 #: build/C/man3/scanf.3:570
9133 msgid "Not enough arguments; or I<format> is NULL."
9134 msgstr ""
9135
9136 #. type: Plain text
9137 #: build/C/man3/scanf.3:573
9138 msgid "Out of memory."
9139 msgstr ""
9140
9141 #. type: TP
9142 #: build/C/man3/scanf.3:573
9143 #, no-wrap
9144 msgid "B<ERANGE>"
9145 msgstr ""
9146
9147 #. type: Plain text
9148 #: build/C/man3/scanf.3:577
9149 msgid ""
9150 "The result of an integer conversion would exceed the size that can be stored "
9151 "in the corresponding integer type."
9152 msgstr ""
9153
9154 #. type: Plain text
9155 #: build/C/man3/scanf.3:587
9156 msgid ""
9157 "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and "
9158 "C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
9159 msgstr ""
9160
9161 #. type: Plain text
9162 #: build/C/man3/scanf.3:597
9163 msgid ""
9164 "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or "
9165 "the usage of B<L> in integer conversions is the GNU notation."
9166 msgstr ""
9167
9168 #. type: Plain text
9169 #: build/C/man3/scanf.3:608
9170 msgid ""
9171 "The Linux version of these functions is based on the I<GNU> I<libio> "
9172 "library.  Take a look at the I<info> documentation of I<GNU> I<libc "
9173 "(glibc-1.08)> for a more concise description."
9174 msgstr ""
9175
9176 #. type: Plain text
9177 #: build/C/man3/scanf.3:614
9178 msgid ""
9179 "The GNU C library supported the dynamic allocation conversion specifier (as "
9180 "a nonstandard extension) via the B<a> character.  This feature seems to be "
9181 "present at least as far back as glibc 2.0."
9182 msgstr ""
9183
9184 #. type: Plain text
9185 #: build/C/man3/scanf.3:624
9186 msgid ""
9187 "It is not available if the program is compiled with I<gcc -std=c99> or I<gcc "
9188 "-D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case "
9189 "the B<a> is interpreted as a specifier for floating-point numbers (see "
9190 "above)."
9191 msgstr ""
9192
9193 #. type: Plain text
9194 #: build/C/man3/scanf.3:633
9195 msgid ""
9196 "Since version 2.7, glibc also provides the B<m> modifier for the same "
9197 "purpose as the B<a> modifier.  The B<m> modifier has the following "
9198 "advantages:"
9199 msgstr ""
9200
9201 #. type: Plain text
9202 #: build/C/man3/scanf.3:638
9203 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
9204 msgstr ""
9205
9206 #. type: Plain text
9207 #: build/C/man3/scanf.3:644
9208 msgid ""
9209 "It avoids ambiguity with respect to the B<%a> floating-point conversion "
9210 "specifier (and is unaffected by I<gcc -std=c99> etc.)"
9211 msgstr ""
9212
9213 #. type: Plain text
9214 #: build/C/man3/scanf.3:646
9215 msgid "It is specified in the POSIX.1-2008 standard."
9216 msgstr ""
9217
9218 #. type: Plain text
9219 #: build/C/man3/scanf.3:659
9220 msgid ""
9221 "All functions are fully C89 conformant, but provide the additional "
9222 "specifiers B<q> and B<a> as well as an additional behavior of the B<L> and "
9223 "B<l> specifiers.  The latter may be considered to be a bug, as it changes "
9224 "the behavior of specifiers defined in C89."
9225 msgstr ""
9226
9227 #. type: Plain text
9228 #: build/C/man3/scanf.3:675
9229 msgid ""
9230 "Some combinations of the type modifiers and conversion specifiers defined by "
9231 "ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined "
9232 "behavior on Linux, this need not to be so on other architectures.  Therefore "
9233 "it usually is better to use modifiers that are not defined by ANSI C at all, "
9234 "that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, "
9235 "B<u>, B<x>, and B<X> conversions or B<ll>."
9236 msgstr ""
9237
9238 #. type: Plain text
9239 #: build/C/man3/scanf.3:681
9240 msgid ""
9241 "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float "
9242 "conversions equivalently to B<L>."
9243 msgstr ""
9244
9245 #. type: Plain text
9246 #: build/C/man3/scanf.3:691
9247 msgid ""
9248 "To use the dynamic allocation conversion specifier, specify B<m> as a length "
9249 "modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  "
9250 "the returned string, as in the following example:"
9251 msgstr ""
9252
9253 #. type: Plain text
9254 #: build/C/man3/scanf.3:696
9255 #, no-wrap
9256 msgid ""
9257 "char *p;\n"
9258 "int n;\n"
9259 msgstr ""
9260
9261 #. type: Plain text
9262 #: build/C/man3/scanf.3:707
9263 #, no-wrap
9264 msgid ""
9265 "errno = 0;\n"
9266 "n = scanf(\"%m[a-z]\", &p);\n"
9267 "if (n == 1) {\n"
9268 "    printf(\"read: %s\\en\", p);\n"
9269 "    free(p);\n"
9270 "} else if (errno != 0) {\n"
9271 "    perror(\"scanf\");\n"
9272 "} else {\n"
9273 "    fprintf(stderr, \"No matching characters\\en\");\n"
9274 "}\n"
9275 msgstr ""
9276
9277 #. type: Plain text
9278 #: build/C/man3/scanf.3:715
9279 msgid ""
9280 "As shown in the above example, it is necessary to call B<free>(3)  only if "
9281 "the B<scanf>()  call successfully read a string."
9282 msgstr ""
9283
9284 #. type: Plain text
9285 #: build/C/man3/scanf.3:722
9286 msgid ""
9287 "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), "
9288 "B<strtoul>(3)"
9289 msgstr ""
9290
9291 #. type: TH
9292 #: build/C/man3/setbuf.3:48
9293 #, no-wrap
9294 msgid "SETBUF"
9295 msgstr ""
9296
9297 #. type: TH
9298 #: build/C/man3/setbuf.3:48
9299 #, no-wrap
9300 msgid "2012-08-03"
9301 msgstr ""
9302
9303 #. type: Plain text
9304 #: build/C/man3/setbuf.3:51
9305 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
9306 msgstr ""
9307
9308 #. type: Plain text
9309 #: build/C/man3/setbuf.3:56
9310 #, no-wrap
9311 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
9312 msgstr ""
9313
9314 #. type: Plain text
9315 #: build/C/man3/setbuf.3:58
9316 #, no-wrap
9317 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
9318 msgstr ""
9319
9320 #. type: Plain text
9321 #: build/C/man3/setbuf.3:60
9322 #, no-wrap
9323 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
9324 msgstr ""
9325
9326 #. type: Plain text
9327 #: build/C/man3/setbuf.3:63
9328 #, no-wrap
9329 msgid ""
9330 "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t "
9331 ">I<size>B<);>\n"
9332 msgstr ""
9333
9334 #. type: Plain text
9335 #: build/C/man3/setbuf.3:73
9336 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
9337 msgstr ""
9338
9339 #. type: Plain text
9340 #: build/C/man3/setbuf.3:96
9341 msgid ""
9342 "The three types of buffering available are unbuffered, block buffered, and "
9343 "line buffered.  When an output stream is unbuffered, information appears on "
9344 "the destination file or terminal as soon as written; when it is block "
9345 "buffered many characters are saved up and written as a block; when it is "
9346 "line buffered characters are saved up until a newline is output or input is "
9347 "read from any stream attached to a terminal device (typically I<stdin>).  "
9348 "The function B<fflush>(3)  may be used to force the block out early.  (See "
9349 "B<fclose>(3).)  Normally all files are block buffered.  When the first I/O "
9350 "operation occurs on a file, B<malloc>(3)  is called, and a buffer is "
9351 "obtained.  If a stream refers to a terminal (as I<stdout> normally does) it "
9352 "is line buffered.  The standard error stream I<stderr> is always unbuffered "
9353 "by default."
9354 msgstr ""
9355
9356 #. type: Plain text
9357 #: build/C/man3/setbuf.3:103
9358 msgid ""
9359 "The B<setvbuf>()  function may be used on any open stream to change its "
9360 "buffer.  The I<mode> argument must be one of the following three macros:"
9361 msgstr ""
9362
9363 #. type: TP
9364 #: build/C/man3/setbuf.3:104
9365 #, no-wrap
9366 msgid "B<_IONBF>"
9367 msgstr ""
9368
9369 #. type: Plain text
9370 #: build/C/man3/setbuf.3:107
9371 msgid "unbuffered"
9372 msgstr ""
9373
9374 #. type: TP
9375 #: build/C/man3/setbuf.3:107
9376 #, no-wrap
9377 msgid "B<_IOLBF>"
9378 msgstr ""
9379
9380 #. type: Plain text
9381 #: build/C/man3/setbuf.3:110
9382 msgid "line buffered"
9383 msgstr ""
9384
9385 #. type: TP
9386 #: build/C/man3/setbuf.3:110
9387 #, no-wrap
9388 msgid "B<_IOFBF>"
9389 msgstr ""
9390
9391 #. type: Plain text
9392 #: build/C/man3/setbuf.3:113
9393 msgid "fully buffered"
9394 msgstr ""
9395
9396 #. type: Plain text
9397 #: build/C/man3/setbuf.3:129
9398 msgid ""
9399 "Except for unbuffered files, the I<buf> argument should point to a buffer at "
9400 "least I<size> bytes long; this buffer will be used instead of the current "
9401 "buffer.  If the argument I<buf> is NULL, only the mode is affected; a new "
9402 "buffer will be allocated on the next read or write operation.  The "
9403 "B<setvbuf>()  function may be used only after opening a stream and before "
9404 "any other operations have been performed on it."
9405 msgstr ""
9406
9407 #. type: Plain text
9408 #: build/C/man3/setbuf.3:135
9409 msgid ""
9410 "The other three calls are, in effect, simply aliases for calls to "
9411 "B<setvbuf>().  The B<setbuf>()  function is exactly equivalent to the call"
9412 msgstr ""
9413
9414 #. type: Plain text
9415 #: build/C/man3/setbuf.3:138
9416 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
9417 msgstr ""
9418
9419 #. type: Plain text
9420 #: build/C/man3/setbuf.3:148
9421 msgid ""
9422 "The B<setbuffer>()  function is the same, except that the size of the buffer "
9423 "is up to the caller, rather than being determined by the default B<BUFSIZ>.  "
9424 "The B<setlinebuf>()  function is exactly equivalent to the call:"
9425 msgstr ""
9426
9427 #. type: Plain text
9428 #: build/C/man3/setbuf.3:151
9429 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
9430 msgstr ""
9431
9432 #. type: Plain text
9433 #: build/C/man3/setbuf.3:162
9434 msgid ""
9435 "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on "
9436 "failure (I<mode> is invalid or the request cannot be honored).  It may set "
9437 "I<errno> on failure."
9438 msgstr ""
9439
9440 #. type: Plain text
9441 #: build/C/man3/setbuf.3:164
9442 msgid "The other functions do not return a value."
9443 msgstr ""
9444
9445 #. type: Plain text
9446 #: build/C/man3/setbuf.3:170
9447 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
9448 msgstr ""
9449
9450 #. type: Plain text
9451 #: build/C/man3/setbuf.3:180
9452 msgid ""
9453 "The B<setbuffer>()  and B<setlinebuf>()  functions are not portable to "
9454 "versions of BSD before 4.2BSD, and are available under Linux since libc "
9455 "4.5.21.  On 4.2BSD and 4.3BSD systems, B<setbuf>()  always uses a suboptimal "
9456 "buffer size and should be avoided."
9457 msgstr ""
9458
9459 #. type: Plain text
9460 #: build/C/man3/setbuf.3:187
9461 msgid ""
9462 "You must make sure that the space that I<buf> points to still exists by the "
9463 "time I<stream> is closed, which also happens at program termination.  For "
9464 "example, the following is invalid:"
9465 msgstr ""
9466
9467 #. type: Plain text
9468 #: build/C/man3/setbuf.3:190
9469 #, no-wrap
9470 msgid "#include E<lt>stdio.hE<gt>\n"
9471 msgstr ""
9472
9473 #. type: Plain text
9474 #: build/C/man3/setbuf.3:199
9475 #, no-wrap
9476 msgid ""
9477 "int\n"
9478 "main(void)\n"
9479 "{\n"
9480 "    char buf[BUFSIZ];\n"
9481 "    setbuf(stdin, buf);\n"
9482 "    printf(\"Hello, world!\\en\");\n"
9483 "    return 0;\n"
9484 "}\n"
9485 msgstr ""
9486
9487 #. type: Plain text
9488 #: build/C/man3/setbuf.3:208
9489 msgid ""
9490 "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), "
9491 "B<printf>(3), B<puts>(3)"
9492 msgstr ""
9493
9494 #. type: TH
9495 #: build/C/man3/stdin.3:13
9496 #, no-wrap
9497 msgid "STDIN"
9498 msgstr ""
9499
9500 #. type: TH
9501 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
9502 #, no-wrap
9503 msgid "2008-07-14"
9504 msgstr ""
9505
9506 #. type: Plain text
9507 #: build/C/man3/stdin.3:16
9508 msgid "stdin, stdout, stderr - standard I/O streams"
9509 msgstr ""
9510
9511 #. type: Plain text
9512 #: build/C/man3/stdin.3:23
9513 #, no-wrap
9514 msgid ""
9515 "B<extern FILE *>I<stdin>B<;>\n"
9516 "B<extern FILE *>I<stdout>B<;>\n"
9517 "B<extern FILE *>I<stderr>B<;>\n"
9518 msgstr ""
9519
9520 #. type: Plain text
9521 #: build/C/man3/stdin.3:35
9522 msgid ""
9523 "Under normal circumstances every UNIX program has three streams opened for "
9524 "it when it starts up, one for input, one for output, and one for printing "
9525 "diagnostic or error messages.  These are typically attached to the user's "
9526 "terminal (see B<tty>(4)  but might instead refer to files or other devices, "
9527 "depending on what the parent process chose to set up.  (See also the "
9528 "\"Redirection\" section of B<sh>(1).)"
9529 msgstr ""
9530
9531 #. type: Plain text
9532 #: build/C/man3/stdin.3:45
9533 msgid ""
9534 "The input stream is referred to as \"standard input\"; the output stream is "
9535 "referred to as \"standard output\"; and the error stream is referred to as "
9536 "\"standard error\".  These terms are abbreviated to form the symbols used to "
9537 "refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
9538 msgstr ""
9539
9540 #. type: Plain text
9541 #: build/C/man3/stdin.3:54
9542 msgid ""
9543 "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, "
9544 "and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
9545 msgstr ""
9546
9547 #. type: Plain text
9548 #: build/C/man3/stdin.3:63
9549 msgid ""
9550 "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the "
9551 "same underlying files may also be accessed using the raw UNIX file "
9552 "interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
9553 msgstr ""
9554
9555 #. type: Plain text
9556 #: build/C/man3/stdin.3:82
9557 msgid ""
9558 "On program startup, the integer file descriptors associated with the streams "
9559 "I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The "
9560 "preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> "
9561 "are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying "
9562 "B<freopen>(3)  to one of these streams can change the file descriptor number "
9563 "associated with the stream.)"
9564 msgstr ""
9565
9566 #. type: Plain text
9567 #: build/C/man3/stdin.3:95
9568 msgid ""
9569 "Note that mixing use of I<FILE>s and raw file descriptors can produce "
9570 "unexpected results and should generally be avoided.  (For the masochistic "
9571 "among you: POSIX.1, section 8.2.3, describes in detail how this interaction "
9572 "is supposed to work.)  A general rule is that file descriptors are handled "
9573 "in the kernel, while stdio is just a library.  This means for example, that "
9574 "after an B<exec>(3), the child inherits all open file descriptors, but all "
9575 "old streams have become inaccessible."
9576 msgstr ""
9577
9578 #. type: Plain text
9579 #: build/C/man3/stdin.3:113
9580 msgid ""
9581 "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be "
9582 "macros, assigning to them is nonportable.  The standard streams can be made "
9583 "to refer to different files with help of the library function B<freopen>(3), "
9584 "specially introduced to make it possible to reassign I<stdin>, I<stdout>, "
9585 "and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and "
9586 "by normal program termination."
9587 msgstr ""
9588
9589 #. type: Plain text
9590 #: build/C/man3/stdin.3:122
9591 msgid ""
9592 "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this "
9593 "standard also stipulates that these three streams shall be open at program "
9594 "startup."
9595 msgstr ""
9596
9597 #. type: Plain text
9598 #: build/C/man3/stdin.3:154
9599 msgid ""
9600 "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered "
9601 "when it points to a terminal.  Partial lines will not appear until "
9602 "B<fflush>(3)  or B<exit>(3)  is called, or a newline is printed.  This can "
9603 "produce unexpected results, especially with debugging output.  The buffering "
9604 "mode of the standard streams (or any other stream)  can be changed using the "
9605 "B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is "
9606 "associated with a terminal, there may also be input buffering in the "
9607 "terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally "
9608 "terminal input is line buffered in the kernel.)  This kernel input handling "
9609 "can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and "
9610 "B<termios>(3)."
9611 msgstr ""
9612
9613 #. type: Plain text
9614 #: build/C/man3/stdin.3:160
9615 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
9616 msgstr ""
9617
9618 #. type: TH
9619 #: build/C/man3/stdio.3:39
9620 #, no-wrap
9621 msgid "STDIO"
9622 msgstr ""
9623
9624 #. type: TH
9625 #: build/C/man3/stdio.3:39
9626 #, no-wrap
9627 msgid "2001-12-26"
9628 msgstr ""
9629
9630 #. type: Plain text
9631 #: build/C/man3/stdio.3:42
9632 msgid "stdio - standard input/output library functions"
9633 msgstr ""
9634
9635 #. type: Plain text
9636 #: build/C/man3/stdio.3:46
9637 msgid "B<FILE *>I<stdin>B<;>"
9638 msgstr ""
9639
9640 #. type: Plain text
9641 #: build/C/man3/stdio.3:48
9642 msgid "B<FILE *>I<stdout>B<;>"
9643 msgstr ""
9644
9645 #. type: Plain text
9646 #: build/C/man3/stdio.3:50
9647 msgid "B<FILE *>I<stderr>B<;>"
9648 msgstr ""
9649
9650 #. type: Plain text
9651 #: build/C/man3/stdio.3:57
9652 msgid ""
9653 "The standard I/O library provides a simple and efficient buffered stream I/O "
9654 "interface.  Input and output is mapped into logical data streams and the "
9655 "physical I/O characteristics are concealed.  The functions and macros are "
9656 "listed below; more information is available from the individual man pages."
9657 msgstr ""
9658
9659 #. type: Plain text
9660 #: build/C/man3/stdio.3:80
9661 msgid ""
9662 "A stream is associated with an external file (which may be a physical "
9663 "device) by I<opening> a file, which may involve creating a new file.  "
9664 "Creating an existing file causes its former contents to be discarded.  If a "
9665 "file can support positioning requests (such as a disk file, as opposed to a "
9666 "terminal) then a I<file position indicator> associated with the stream is "
9667 "positioned at the start of the file (byte zero), unless the file is opened "
9668 "with append mode.  If append mode is used, it is unspecified whether the "
9669 "position indicator will be placed at the start or the end of the file.  The "
9670 "position indicator is maintained by subsequent reads, writes and positioning "
9671 "requests.  All input occurs as if the characters were read by successive "
9672 "calls to the B<fgetc>(3)  function; all output takes place as if all "
9673 "characters were written by successive calls to the B<fputc>(3)  function."
9674 msgstr ""
9675
9676 #. type: Plain text
9677 #: build/C/man3/stdio.3:90
9678 msgid ""
9679 "A file is disassociated from a stream by I<closing> the file.  Output "
9680 "streams are flushed (any unwritten buffer contents are transferred to the "
9681 "host environment) before the stream is disassociated from the file.  The "
9682 "value of a pointer to a I<FILE> object is indeterminate after a file is "
9683 "closed (garbage)."
9684 msgstr ""
9685
9686 #. type: Plain text
9687 #: build/C/man3/stdio.3:103
9688 msgid ""
9689 "A file may be subsequently reopened, by the same or another program "
9690 "execution, and its contents reclaimed or modified (if it can be repositioned "
9691 "at the start).  If the main function returns to its original caller, or the "
9692 "B<exit>(3)  function is called, all open files are closed (hence all output "
9693 "streams are flushed) before program termination.  Other methods of program "
9694 "termination, such as B<abort>(3)  do not bother about closing files "
9695 "properly."
9696 msgstr ""
9697
9698 #. type: Plain text
9699 #: build/C/man3/stdio.3:119
9700 msgid ""
9701 "At program startup, three text streams are predefined and need not be opened "
9702 "explicitly: I<standard input> (for reading conventional input), I<standard "
9703 "output> (for writing conventional input), and I<standard error> (for writing "
9704 "diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and "
9705 "I<stderr>.  When opened, the standard error stream is not fully buffered; "
9706 "the standard input and output streams are fully buffered if and only if the "
9707 "streams do not refer to an interactive device."
9708 msgstr ""
9709
9710 #. type: Plain text
9711 #: build/C/man3/stdio.3:129
9712 msgid ""
9713 "Output streams that refer to terminal devices are always line buffered by "
9714 "default; pending output to such streams is written automatically whenever an "
9715 "input stream that refers to a terminal device is read.  In cases where a "
9716 "large amount of computation is done after printing part of a line on an "
9717 "output terminal, it is necessary to B<fflush>(3)  the standard output before "
9718 "going off and computing so that the output will appear."
9719 msgstr ""
9720
9721 #. type: Plain text
9722 #: build/C/man3/stdio.3:143
9723 msgid ""
9724 "The I<stdio> library is a part of the library B<libc> and routines are "
9725 "automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The "
9726 "SYNOPSIS sections of the following manual pages indicate which include files "
9727 "are to be used, what the compiler declaration for the function looks like "
9728 "and which external variables are of interest."
9729 msgstr ""
9730
9731 #.  Not on Linux: .BR fropen ,
9732 #.  Not on Linux: .BR fwopen ,
9733 #. type: Plain text
9734 #: build/C/man3/stdio.3:183
9735 msgid ""
9736 "The following are defined as macros; these names may not be reused without "
9737 "first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, "
9738 "B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, "
9739 "B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, "
9740 "B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, "
9741 "B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions "
9742 "B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, "
9743 "and B<putchar> exist and will be used if the macros definitions are "
9744 "explicitly removed."
9745 msgstr ""
9746
9747 #. type: SS
9748 #: build/C/man3/stdio.3:183
9749 #, no-wrap
9750 msgid "List of functions"
9751 msgstr ""
9752
9753 #. type: tbl table
9754 #: build/C/man3/stdio.3:188
9755 #, no-wrap
9756 msgid "Function\tDescription\n"
9757 msgstr ""
9758
9759 #. type: tbl table
9760 #: build/C/man3/stdio.3:189
9761 #, no-wrap
9762 msgid "_\n"
9763 msgstr ""
9764
9765 #. type: tbl table
9766 #: build/C/man3/stdio.3:190
9767 #, no-wrap
9768 msgid "clearerr\tcheck and reset stream status\n"
9769 msgstr ""
9770
9771 #. type: tbl table
9772 #: build/C/man3/stdio.3:191
9773 #, no-wrap
9774 msgid "fclose\tclose a stream\n"
9775 msgstr ""
9776
9777 #. type: tbl table
9778 #: build/C/man3/stdio.3:192
9779 #, no-wrap
9780 msgid "fdopen\tstream open functions\n"
9781 msgstr ""
9782
9783 #. type: tbl table
9784 #: build/C/man3/stdio.3:193
9785 #, no-wrap
9786 msgid "feof\tcheck and reset stream status\n"
9787 msgstr ""
9788
9789 #. type: tbl table
9790 #: build/C/man3/stdio.3:194
9791 #, no-wrap
9792 msgid "ferror\tcheck and reset stream status\n"
9793 msgstr ""
9794
9795 #. type: tbl table
9796 #: build/C/man3/stdio.3:195
9797 #, no-wrap
9798 msgid "fflush\tflush a stream\n"
9799 msgstr ""
9800
9801 #. type: tbl table
9802 #: build/C/man3/stdio.3:196
9803 #, no-wrap
9804 msgid "fgetc\tget next character or word from input stream\n"
9805 msgstr ""
9806
9807 #. type: tbl table
9808 #: build/C/man3/stdio.3:197
9809 #, no-wrap
9810 msgid "fgetpos\treposition a stream\n"
9811 msgstr ""
9812
9813 #. type: tbl table
9814 #: build/C/man3/stdio.3:198
9815 #, no-wrap
9816 msgid "fgets\tget a line from a stream\n"
9817 msgstr ""
9818
9819 #. type: tbl table
9820 #: build/C/man3/stdio.3:199
9821 #, no-wrap
9822 msgid "fileno\treturn the integer descriptor of the argument stream\n"
9823 msgstr ""
9824
9825 #. type: tbl table
9826 #: build/C/man3/stdio.3:200
9827 #, no-wrap
9828 msgid "fopen\tstream open functions\n"
9829 msgstr ""
9830
9831 #. type: tbl table
9832 #: build/C/man3/stdio.3:201
9833 #, no-wrap
9834 msgid "fprintf\tformatted output conversion\n"
9835 msgstr ""
9836
9837 #. type: tbl table
9838 #: build/C/man3/stdio.3:202
9839 #, no-wrap
9840 msgid "fpurge\tflush a stream\n"
9841 msgstr ""
9842
9843 #. type: tbl table
9844 #: build/C/man3/stdio.3:203
9845 #, no-wrap
9846 msgid "fputc\toutput a character or word to a stream\n"
9847 msgstr ""
9848
9849 #. type: tbl table
9850 #: build/C/man3/stdio.3:204
9851 #, no-wrap
9852 msgid "fputs\toutput a line to a stream\n"
9853 msgstr ""
9854
9855 #. type: tbl table
9856 #: build/C/man3/stdio.3:205
9857 #, no-wrap
9858 msgid "fread\tbinary stream input/output\n"
9859 msgstr ""
9860
9861 #. type: tbl table
9862 #: build/C/man3/stdio.3:206
9863 #, no-wrap
9864 msgid "freopen\tstream open functions\n"
9865 msgstr ""
9866
9867 #. type: tbl table
9868 #: build/C/man3/stdio.3:207
9869 #, no-wrap
9870 msgid "fscanf\tinput format conversion\n"
9871 msgstr ""
9872
9873 #. type: tbl table
9874 #: build/C/man3/stdio.3:208
9875 #, no-wrap
9876 msgid "fseek\treposition a stream\n"
9877 msgstr ""
9878
9879 #. type: tbl table
9880 #: build/C/man3/stdio.3:209
9881 #, no-wrap
9882 msgid "fsetpos\treposition a stream\n"
9883 msgstr ""
9884
9885 #. type: tbl table
9886 #: build/C/man3/stdio.3:210
9887 #, no-wrap
9888 msgid "ftell\treposition a stream\n"
9889 msgstr ""
9890
9891 #. type: tbl table
9892 #: build/C/man3/stdio.3:211
9893 #, no-wrap
9894 msgid "fwrite\tbinary stream input/output\n"
9895 msgstr ""
9896
9897 #. type: tbl table
9898 #: build/C/man3/stdio.3:212
9899 #, no-wrap
9900 msgid "getc\tget next character or word from input stream\n"
9901 msgstr ""
9902
9903 #. type: tbl table
9904 #: build/C/man3/stdio.3:213
9905 #, no-wrap
9906 msgid "getchar\tget next character or word from input stream\n"
9907 msgstr ""
9908
9909 #. type: tbl table
9910 #: build/C/man3/stdio.3:214
9911 #, no-wrap
9912 msgid "gets\tget a line from a stream\n"
9913 msgstr ""
9914
9915 #. type: tbl table
9916 #: build/C/man3/stdio.3:215
9917 #, no-wrap
9918 msgid "getw\tget next character or word from input stream\n"
9919 msgstr ""
9920
9921 #. type: tbl table
9922 #: build/C/man3/stdio.3:216
9923 #, no-wrap
9924 msgid "mktemp\tmake temporary filename (unique)\n"
9925 msgstr ""
9926
9927 #. type: tbl table
9928 #: build/C/man3/stdio.3:217
9929 #, no-wrap
9930 msgid "perror\tsystem error messages\n"
9931 msgstr ""
9932
9933 #. type: tbl table
9934 #: build/C/man3/stdio.3:218
9935 #, no-wrap
9936 msgid "printf\tformatted output conversion\n"
9937 msgstr ""
9938
9939 #. type: tbl table
9940 #: build/C/man3/stdio.3:219
9941 #, no-wrap
9942 msgid "putc\toutput a character or word to a stream\n"
9943 msgstr ""
9944
9945 #. type: tbl table
9946 #: build/C/man3/stdio.3:220
9947 #, no-wrap
9948 msgid "putchar\toutput a character or word to a stream\n"
9949 msgstr ""
9950
9951 #. type: tbl table
9952 #: build/C/man3/stdio.3:221
9953 #, no-wrap
9954 msgid "puts\toutput a line to a stream\n"
9955 msgstr ""
9956
9957 #. type: tbl table
9958 #: build/C/man3/stdio.3:222
9959 #, no-wrap
9960 msgid "putw\toutput a character or word to a stream\n"
9961 msgstr ""
9962
9963 #. type: tbl table
9964 #: build/C/man3/stdio.3:223
9965 #, no-wrap
9966 msgid "remove\tremove directory entry\n"
9967 msgstr ""
9968
9969 #. type: tbl table
9970 #: build/C/man3/stdio.3:224
9971 #, no-wrap
9972 msgid "rewind\treposition a stream\n"
9973 msgstr ""
9974
9975 #. type: tbl table
9976 #: build/C/man3/stdio.3:225
9977 #, no-wrap
9978 msgid "scanf\tinput format conversion\n"
9979 msgstr ""
9980
9981 #. type: tbl table
9982 #: build/C/man3/stdio.3:226
9983 #, no-wrap
9984 msgid "setbuf\tstream buffering operations\n"
9985 msgstr ""
9986
9987 #. type: tbl table
9988 #: build/C/man3/stdio.3:227
9989 #, no-wrap
9990 msgid "setbuffer\tstream buffering operations\n"
9991 msgstr ""
9992
9993 #. type: tbl table
9994 #: build/C/man3/stdio.3:228
9995 #, no-wrap
9996 msgid "setlinebuf\tstream buffering operations\n"
9997 msgstr ""
9998
9999 #. type: tbl table
10000 #: build/C/man3/stdio.3:229
10001 #, no-wrap
10002 msgid "setvbuf\tstream buffering operations\n"
10003 msgstr ""
10004
10005 #. type: tbl table
10006 #: build/C/man3/stdio.3:230
10007 #, no-wrap
10008 msgid "sprintf\tformatted output conversion\n"
10009 msgstr ""
10010
10011 #. type: tbl table
10012 #: build/C/man3/stdio.3:231
10013 #, no-wrap
10014 msgid "sscanf\tinput format conversion\n"
10015 msgstr ""
10016
10017 #. type: tbl table
10018 #: build/C/man3/stdio.3:232
10019 #, no-wrap
10020 msgid "strerror\tsystem error messages\n"
10021 msgstr ""
10022
10023 #. type: tbl table
10024 #: build/C/man3/stdio.3:233
10025 #, no-wrap
10026 msgid "sys_errlist\tsystem error messages\n"
10027 msgstr ""
10028
10029 #. type: tbl table
10030 #: build/C/man3/stdio.3:234
10031 #, no-wrap
10032 msgid "sys_nerr\tsystem error messages\n"
10033 msgstr ""
10034
10035 #. type: tbl table
10036 #: build/C/man3/stdio.3:235
10037 #, no-wrap
10038 msgid "tempnam\ttemporary file routines\n"
10039 msgstr ""
10040
10041 #. type: tbl table
10042 #: build/C/man3/stdio.3:236
10043 #, no-wrap
10044 msgid "tmpfile\ttemporary file routines\n"
10045 msgstr ""
10046
10047 #. type: tbl table
10048 #: build/C/man3/stdio.3:237
10049 #, no-wrap
10050 msgid "tmpnam\ttemporary file routines\n"
10051 msgstr ""
10052
10053 #. type: tbl table
10054 #: build/C/man3/stdio.3:238
10055 #, no-wrap
10056 msgid "ungetc\tun-get character from input stream\n"
10057 msgstr ""
10058
10059 #. type: tbl table
10060 #: build/C/man3/stdio.3:239
10061 #, no-wrap
10062 msgid "vfprintf\tformatted output conversion\n"
10063 msgstr ""
10064
10065 #. type: tbl table
10066 #: build/C/man3/stdio.3:240
10067 #, no-wrap
10068 msgid "vfscanf\tinput format conversion\n"
10069 msgstr ""
10070
10071 #. type: tbl table
10072 #: build/C/man3/stdio.3:241
10073 #, no-wrap
10074 msgid "vprintf\tformatted output conversion\n"
10075 msgstr ""
10076
10077 #. type: tbl table
10078 #: build/C/man3/stdio.3:242
10079 #, no-wrap
10080 msgid "vscanf\tinput format conversion\n"
10081 msgstr ""
10082
10083 #. type: tbl table
10084 #: build/C/man3/stdio.3:243
10085 #, no-wrap
10086 msgid "vsprintf\tformatted output conversion\n"
10087 msgstr ""
10088
10089 #. type: tbl table
10090 #: build/C/man3/stdio.3:244
10091 #, no-wrap
10092 msgid "vsscanf\tinput format conversion\n"
10093 msgstr ""
10094
10095 #. type: Plain text
10096 #: build/C/man3/stdio.3:250
10097 msgid "The I<stdio> library conforms to C89."
10098 msgstr ""
10099
10100 #. type: Plain text
10101 #: build/C/man3/stdio.3:257
10102 msgid ""
10103 "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), "
10104 "B<unlocked_stdio>(3)"
10105 msgstr ""
10106
10107 #. type: TH
10108 #: build/C/man3/stdio_ext.3:25
10109 #, no-wrap
10110 msgid "STDIO_EXT"
10111 msgstr ""
10112
10113 #. type: Plain text
10114 #: build/C/man3/stdio_ext.3:30
10115 msgid ""
10116 "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, "
10117 "__fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE "
10118 "structure"
10119 msgstr ""
10120
10121 #. type: Plain text
10122 #: build/C/man3/stdio_ext.3:34
10123 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
10124 msgstr ""
10125
10126 #. type: Plain text
10127 #: build/C/man3/stdio_ext.3:36
10128 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
10129 msgstr ""
10130
10131 #. type: Plain text
10132 #: build/C/man3/stdio_ext.3:38
10133 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
10134 msgstr ""
10135
10136 #. type: Plain text
10137 #: build/C/man3/stdio_ext.3:40
10138 msgid "B<int __flbf(FILE *>I<stream>B<);>"
10139 msgstr ""
10140
10141 #. type: Plain text
10142 #: build/C/man3/stdio_ext.3:42
10143 msgid "B<int __freadable(FILE *>I<stream>B<);>"
10144 msgstr ""
10145
10146 #. type: Plain text
10147 #: build/C/man3/stdio_ext.3:44
10148 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
10149 msgstr ""
10150
10151 #. type: Plain text
10152 #: build/C/man3/stdio_ext.3:46
10153 msgid "B<int __freading(FILE *>I<stream>B<);>"
10154 msgstr ""
10155
10156 #. type: Plain text
10157 #: build/C/man3/stdio_ext.3:48
10158 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
10159 msgstr ""
10160
10161 #. type: Plain text
10162 #: build/C/man3/stdio_ext.3:50
10163 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
10164 msgstr ""
10165
10166 #. type: Plain text
10167 #: build/C/man3/stdio_ext.3:52
10168 msgid "B<void _flushlbf(void);>"
10169 msgstr ""
10170
10171 #. type: Plain text
10172 #: build/C/man3/stdio_ext.3:54
10173 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
10174 msgstr ""
10175
10176 #. type: Plain text
10177 #: build/C/man3/stdio_ext.3:59
10178 msgid ""
10179 "Solaris introduced routines to allow portable access to the internals of the "
10180 "I<FILE> structure, and glibc also implemented these."
10181 msgstr ""
10182
10183 #. type: Plain text
10184 #: build/C/man3/stdio_ext.3:64
10185 msgid ""
10186 "The B<__fbufsize>()  function returns the size of the buffer currently used "
10187 "by the given stream."
10188 msgstr ""
10189
10190 #. type: Plain text
10191 #: build/C/man3/stdio_ext.3:71
10192 msgid ""
10193 "The B<__fpending>()  function returns the number of bytes in the output "
10194 "buffer.  For wide-oriented streams the unit is wide characters.  This "
10195 "function is undefined on buffers in reading mode, or opened read-only."
10196 msgstr ""
10197
10198 #. type: Plain text
10199 #: build/C/man3/stdio_ext.3:76
10200 msgid ""
10201 "The B<__flbf>()  function returns a nonzero value if the stream is "
10202 "line-buffered, and zero otherwise."
10203 msgstr ""
10204
10205 #. type: Plain text
10206 #: build/C/man3/stdio_ext.3:81
10207 msgid ""
10208 "The B<__freadable>()  function returns a nonzero value if the stream allows "
10209 "reading, and zero otherwise."
10210 msgstr ""
10211
10212 #. type: Plain text
10213 #: build/C/man3/stdio_ext.3:86
10214 msgid ""
10215 "The B<__fwritable>()  function returns a nonzero value if the stream allows "
10216 "writing, and zero otherwise."
10217 msgstr ""
10218
10219 #. type: Plain text
10220 #: build/C/man3/stdio_ext.3:92
10221 msgid ""
10222 "The B<__freading>()  function returns a nonzero value if the stream is "
10223 "read-only, or if the last operation on the stream was a read operation, and "
10224 "zero otherwise."
10225 msgstr ""
10226
10227 #. type: Plain text
10228 #: build/C/man3/stdio_ext.3:98
10229 msgid ""
10230 "The B<__fwriting>()  function returns a nonzero value if the stream is "
10231 "write-only (or append-only), or if the last operation on the stream was a "
10232 "write operation, and zero otherwise."
10233 msgstr ""
10234
10235 #. type: Plain text
10236 #: build/C/man3/stdio_ext.3:106
10237 msgid ""
10238 "The B<__fsetlocking>()  function can be used to select the desired type of "
10239 "locking on the stream.  It returns the current type.  The I<type> argument "
10240 "can take the following three values:"
10241 msgstr ""
10242
10243 #. type: TP
10244 #: build/C/man3/stdio_ext.3:106
10245 #, no-wrap
10246 msgid "B<FSETLOCKING_INTERNAL>"
10247 msgstr ""
10248
10249 #. type: Plain text
10250 #: build/C/man3/stdio_ext.3:111
10251 msgid ""
10252 "Perform implicit locking around every operation on the given stream (except "
10253 "for the *_unlocked ones).  This is the default."
10254 msgstr ""
10255
10256 #. type: TP
10257 #: build/C/man3/stdio_ext.3:111
10258 #, no-wrap
10259 msgid "B<FSETLOCKING_BYCALLER>"
10260 msgstr ""
10261
10262 #. type: Plain text
10263 #: build/C/man3/stdio_ext.3:118
10264 msgid ""
10265 "The caller will take care of the locking (possibly using B<flockfile>(3)  in "
10266 "case there is more than one thread), and the stdio routines will not do "
10267 "locking until the state is reset to B<FSETLOCKING_INTERNAL>."
10268 msgstr ""
10269
10270 #. type: TP
10271 #: build/C/man3/stdio_ext.3:118
10272 #, no-wrap
10273 msgid "B<FSETLOCKING_QUERY>"
10274 msgstr ""
10275
10276 #. type: Plain text
10277 #: build/C/man3/stdio_ext.3:122
10278 msgid "Don't change the type of locking.  (Only return it.)"
10279 msgstr ""
10280
10281 #. type: Plain text
10282 #: build/C/man3/stdio_ext.3:128
10283 msgid ""
10284 "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably "
10285 "so that output to a terminal is forced out, say before reading keyboard "
10286 "input.)"
10287 msgstr ""
10288
10289 #. type: Plain text
10290 #: build/C/man3/stdio_ext.3:132
10291 msgid "The B<__fpurge>()  function discards the contents of the stream's buffer."
10292 msgstr ""
10293
10294 #. type: Plain text
10295 #: build/C/man3/stdio_ext.3:141
10296 msgid ""
10297 "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  "
10298 "functions do not lock the stream, so they are not thread-safe."
10299 msgstr ""
10300
10301 #. type: Plain text
10302 #: build/C/man3/stdio_ext.3:151
10303 msgid ""
10304 "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), "
10305 "B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
10306 msgstr ""
10307
10308 #. type: Plain text
10309 #: build/C/man3/stdio_ext.3:154
10310 msgid "B<flockfile>(3), B<fpurge>(3)"
10311 msgstr ""
10312
10313 #. type: TH
10314 #: build/C/man2/symlink.2:32 build/C/man7/symlink.7:36
10315 #, no-wrap
10316 msgid "SYMLINK"
10317 msgstr ""
10318
10319 #. type: Plain text
10320 #: build/C/man2/symlink.2:35
10321 msgid "symlink - make a new name for a file"
10322 msgstr ""
10323
10324 #. type: Plain text
10325 #: build/C/man2/symlink.2:39
10326 msgid "B<int symlink(const char *>I<oldpath>B<, const char *>I<newpath>B<);>"
10327 msgstr ""
10328
10329 #. type: Plain text
10330 #: build/C/man2/symlink.2:47
10331 msgid "B<symlink>():"
10332 msgstr ""
10333
10334 #. type: Plain text
10335 #: build/C/man2/symlink.2:58
10336 msgid ""
10337 "B<symlink>()  creates a symbolic link named I<newpath> which contains the "
10338 "string I<oldpath>."
10339 msgstr ""
10340
10341 #. type: Plain text
10342 #: build/C/man2/symlink.2:62
10343 msgid ""
10344 "Symbolic links are interpreted at run time as if the contents of the link "
10345 "had been substituted into the path being followed to find a file or "
10346 "directory."
10347 msgstr ""
10348
10349 #. type: Plain text
10350 #: build/C/man2/symlink.2:67
10351 msgid ""
10352 "Symbolic links may contain I<..> path components, which (if used at the "
10353 "start of the link) refer to the parent directories of that in which the link "
10354 "resides."
10355 msgstr ""
10356
10357 #. type: Plain text
10358 #: build/C/man2/symlink.2:71
10359 msgid ""
10360 "A symbolic link (also known as a soft link) may point to an existing file or "
10361 "to a nonexistent one; the latter case is known as a dangling link."
10362 msgstr ""
10363
10364 #. type: Plain text
10365 #: build/C/man2/symlink.2:78
10366 msgid ""
10367 "The permissions of a symbolic link are irrelevant; the ownership is ignored "
10368 "when following the link, but is checked when removal or renaming of the link "
10369 "is requested and the link is in a directory with the sticky bit (B<S_ISVTX>)  "
10370 "set."
10371 msgstr ""
10372
10373 #. type: Plain text
10374 #: build/C/man2/symlink.2:99
10375 msgid ""
10376 "Write access to the directory containing I<newpath> is denied, or one of the "
10377 "directories in the path prefix of I<newpath> did not allow search "
10378 "permission.  (See also B<path_resolution>(7).)"
10379 msgstr ""
10380
10381 #. type: Plain text
10382 #: build/C/man2/symlink.2:104
10383 msgid ""
10384 "The user's quota of resources on the file system has been exhausted.  The "
10385 "resources could be inodes or disk blocks, depending on the file system "
10386 "implementation."
10387 msgstr ""
10388
10389 #. type: Plain text
10390 #: build/C/man2/symlink.2:118
10391 msgid "Too many symbolic links were encountered in resolving I<newpath>."
10392 msgstr ""
10393
10394 #. type: Plain text
10395 #: build/C/man2/symlink.2:128
10396 msgid ""
10397 "A directory component in I<newpath> does not exist or is a dangling symbolic "
10398 "link, or I<oldpath> is the empty string."
10399 msgstr ""
10400
10401 #. type: Plain text
10402 #: build/C/man2/symlink.2:140
10403 msgid "A component used as a directory in I<newpath> is not, in fact, a directory."
10404 msgstr ""
10405
10406 #. type: Plain text
10407 #: build/C/man2/symlink.2:145
10408 msgid ""
10409 "The file system containing I<newpath> does not support the creation of "
10410 "symbolic links."
10411 msgstr ""
10412
10413 #. type: Plain text
10414 #: build/C/man2/symlink.2:149
10415 msgid "I<newpath> is on a read-only file system."
10416 msgstr ""
10417
10418 #. type: Plain text
10419 #: build/C/man2/symlink.2:159
10420 msgid "No checking of I<oldpath> is done."
10421 msgstr ""
10422
10423 #. type: Plain text
10424 #: build/C/man2/symlink.2:164
10425 msgid ""
10426 "Deleting the name referred to by a symlink will actually delete the file "
10427 "(unless it also has other hard links).  If this behavior is not desired, use "
10428 "B<link>(2)."
10429 msgstr ""
10430
10431 #. type: Plain text
10432 #: build/C/man2/symlink.2:176
10433 msgid ""
10434 "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), "
10435 "B<rename>(2), B<symlinkat>(2), B<unlink>(2), B<path_resolution>(7), "
10436 "B<symlink>(7)"
10437 msgstr ""
10438
10439 #. type: TH
10440 #: build/C/man7/symlink.7:36
10441 #, no-wrap
10442 msgid "2008-06-18"
10443 msgstr ""
10444
10445 #. type: Plain text
10446 #: build/C/man7/symlink.7:39
10447 msgid "symlink - symbolic link handling"
10448 msgstr ""
10449
10450 #. type: SH
10451 #: build/C/man7/symlink.7:39
10452 #, no-wrap
10453 msgid "SYMBOLIC LINK HANDLING"
10454 msgstr ""
10455
10456 #. type: Plain text
10457 #: build/C/man7/symlink.7:43
10458 msgid ""
10459 "Symbolic links are files that act as pointers to other files.  To understand "
10460 "their behavior, you must first understand how hard links work."
10461 msgstr ""
10462
10463 #. type: Plain text
10464 #: build/C/man7/symlink.7:59
10465 msgid ""
10466 "A hard link to a file is indistinguishable from the original file because it "
10467 "is a reference to the object underlying the original filename.  (To be "
10468 "precise: each of the hard links to a file is a reference to the same "
10469 "I<i-node number>, where an i-node number is an index into the i-node table, "
10470 "which contains metadata about all files on a file system.  See B<stat>(2).)  "
10471 "Changes to a file are independent of the name used to reference the file.  "
10472 "Hard links may not refer to directories (to prevent the possibility of loops "
10473 "within the file system tree, which would confuse many programs)  and may not "
10474 "refer to files on different file systems (because i-node numbers are not "
10475 "unique across file systems)."
10476 msgstr ""
10477
10478 #. type: Plain text
10479 #: build/C/man7/symlink.7:66
10480 msgid ""
10481 "A symbolic link is a special type of file whose contents are a string that "
10482 "is the pathname another file, the file to which the link refers.  In other "
10483 "words, a symbolic link is a pointer to another name, and not to an "
10484 "underlying object.  For this reason, symbolic links may refer to directories "
10485 "and may cross file system boundaries."
10486 msgstr ""
10487
10488 #. type: Plain text
10489 #: build/C/man7/symlink.7:72
10490 msgid ""
10491 "There is no requirement that the pathname referred to by a symbolic link "
10492 "should exist.  A symbolic link that refers to a pathname that does not exist "
10493 "is said to be a I<dangling link>."
10494 msgstr ""
10495
10496 #. type: Plain text
10497 #: build/C/man7/symlink.7:84
10498 msgid ""
10499 "Because a symbolic link and its referenced object coexist in the file system "
10500 "name space, confusion can arise in distinguishing between the link itself "
10501 "and the referenced object.  On historical systems, commands and system calls "
10502 "adopted their own link-following conventions in a somewhat ad-hoc fashion.  "
10503 "Rules for a more uniform approach, as they are implemented on Linux and "
10504 "other systems, are outlined here.  It is important that site-local "
10505 "applications also conform to these rules, so that the user interface can be "
10506 "as consistent as possible."
10507 msgstr ""
10508
10509 #. type: SS
10510 #: build/C/man7/symlink.7:84
10511 #, no-wrap
10512 msgid "Symbolic link ownership, permissions, and timestamps"
10513 msgstr ""
10514
10515 #. type: Plain text
10516 #: build/C/man7/symlink.7:92
10517 msgid ""
10518 "The owner and group of an existing symbolic link can be changed using "
10519 "B<lchown>(2).  The only time that the ownership of a symbolic link matters "
10520 "is when the link is being removed or renamed in a directory that has the "
10521 "sticky bit set (see B<stat>(2))."
10522 msgstr ""
10523
10524 #. type: Plain text
10525 #: build/C/man7/symlink.7:98
10526 msgid ""
10527 "The last access and last modification timestamps of a symbolic link can be "
10528 "changed using B<utimensat>(2)  or B<lutimes>(3)."
10529 msgstr ""
10530
10531 #.  Linux does not currently implement an lchmod(2).
10532 #
10533 #.  The
10534 #.  4.4BSD
10535 #.  system differs from historical
10536 #.  4BSD
10537 #.  systems in that the system call
10538 #.  .BR chown (2)
10539 #.  has been changed to follow symbolic links.
10540 #.  The
10541 #.  .BR lchown (2)
10542 #.  system call was added later when the limitations of the new
10543 #.  .BR chown (2)
10544 #.  became apparent.
10545 #. type: Plain text
10546 #: build/C/man7/symlink.7:117
10547 msgid ""
10548 "On Linux, the permissions of a symbolic link are not used in any operations; "
10549 "the permissions are always 0777 (read, write, and execute for all user "
10550 "categories), and can't be changed."
10551 msgstr ""
10552
10553 #. type: SS
10554 #: build/C/man7/symlink.7:117
10555 #, no-wrap
10556 msgid "Handling of symbolic links by system calls and commands"
10557 msgstr ""
10558
10559 #. type: Plain text
10560 #: build/C/man7/symlink.7:132
10561 msgid ""
10562 "Symbolic links are handled either by operating on the link itself, or by "
10563 "operating on the object referred to by the link.  In the latter case, an "
10564 "application or system call is said to I<follow> the link.  Symbolic links "
10565 "may refer to other symbolic links, in which case the links are dereferenced "
10566 "until an object that is not a symbolic link is found, a symbolic link that "
10567 "refers to a file which does not exist is found, or a loop is detected.  "
10568 "(Loop detection is done by placing an upper limit on the number of links "
10569 "that may be followed, and an error results if this limit is exceeded.)"
10570 msgstr ""
10571
10572 #. type: Plain text
10573 #: build/C/man7/symlink.7:135
10574 msgid ""
10575 "There are three separate areas that need to be discussed.  They are as "
10576 "follows:"
10577 msgstr ""
10578
10579 #. type: IP
10580 #: build/C/man7/symlink.7:135
10581 #, no-wrap
10582 msgid "1."
10583 msgstr ""
10584
10585 #. type: Plain text
10586 #: build/C/man7/symlink.7:137
10587 msgid "Symbolic links used as filename arguments for system calls."
10588 msgstr ""
10589
10590 #. type: IP
10591 #: build/C/man7/symlink.7:137
10592 #, no-wrap
10593 msgid "2."
10594 msgstr ""
10595
10596 #. type: Plain text
10597 #: build/C/man7/symlink.7:140
10598 msgid ""
10599 "Symbolic links specified as command-line arguments to utilities that are not "
10600 "traversing a file tree."
10601 msgstr ""
10602
10603 #. type: IP
10604 #: build/C/man7/symlink.7:140
10605 #, no-wrap
10606 msgid "3."
10607 msgstr ""
10608
10609 #. type: Plain text
10610 #: build/C/man7/symlink.7:144
10611 msgid ""
10612 "Symbolic links encountered by utilities that are traversing a file tree "
10613 "(either specified on the command line or encountered as part of the file "
10614 "hierarchy walk)."
10615 msgstr ""
10616
10617 #. type: SS
10618 #: build/C/man7/symlink.7:144
10619 #, no-wrap
10620 msgid "System calls"
10621 msgstr ""
10622
10623 #. type: Plain text
10624 #: build/C/man7/symlink.7:147
10625 msgid ""
10626 "The first area is symbolic links used as filename arguments for system "
10627 "calls."
10628 msgstr ""
10629
10630 #. type: Plain text
10631 #: build/C/man7/symlink.7:157
10632 msgid ""
10633 "Except as noted below, all system calls follow symbolic links.  For example, "
10634 "if there were a symbolic link I<slink> which pointed to a file named "
10635 "I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file "
10636 "descriptor referring to the file I<afile>."
10637 msgstr ""
10638
10639 #.  Maybe one day: .BR fchownat (2)
10640 #. type: Plain text
10641 #: build/C/man7/symlink.7:207
10642 msgid ""
10643 "Various system calls do not follow links, and operate on the symbolic link "
10644 "itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), "
10645 "B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), "
10646 "B<rename>(2), B<rmdir>(2), and B<unlink>(2).  Certain other system calls "
10647 "optionally follow symbolic links.  They are: B<faccessat>(2), "
10648 "B<fchownat>(2), B<fstatat>(2), B<linkat>(2), B<open>(2), B<openat>(2), and "
10649 "B<utimensat>(2); see their manual pages for details.  Because B<remove>(3)  "
10650 "is an alias for B<unlink>(2), that library function also does not follow "
10651 "symbolic links.  When B<rmdir>(2)  is applied to a symbolic link, it fails "
10652 "with the error B<ENOTDIR>.  The B<link>(2)  warrants special discussion.  "
10653 "POSIX.1-2001 specifies that B<link>(2)  should dereference I<oldpath> if it "
10654 "is a symbolic link.  However, Linux does not do this.  (By default Solaris "
10655 "is the same, but the POSIX.1-2001 specified behavior can be obtained with "
10656 "suitable compiler options.)  The upcoming POSIX.1 revision changes the "
10657 "specification to allow either behavior in an implementation."
10658 msgstr ""
10659
10660 #. type: SS
10661 #: build/C/man7/symlink.7:207
10662 #, no-wrap
10663 msgid "Commands not traversing a file tree"
10664 msgstr ""
10665
10666 #. type: Plain text
10667 #: build/C/man7/symlink.7:210
10668 msgid ""
10669 "The second area is symbolic links, specified as command-line filename "
10670 "arguments, to commands which are not traversing a file tree."
10671 msgstr ""
10672
10673 #. type: Plain text
10674 #: build/C/man7/symlink.7:221
10675 msgid ""
10676 "Except as noted below, commands follow symbolic links named as command-line "
10677 "arguments.  For example, if there were a symbolic link I<slink> which "
10678 "pointed to a file named I<afile>, the command I<cat slink> would display the "
10679 "contents of the file I<afile>."
10680 msgstr ""
10681
10682 #. type: Plain text
10683 #: build/C/man7/symlink.7:229
10684 msgid ""
10685 "It is important to realize that this rule includes commands which may "
10686 "optionally traverse file trees, e.g., the command I<chown file> is included "
10687 "in this rule, while the command I<chown\\ -R file>, which performs a tree "
10688 "traversal, is not.  (The latter is described in the third area, below.)"
10689 msgstr ""
10690
10691 #. type: Plain text
10692 #: build/C/man7/symlink.7:247
10693 msgid ""
10694 "If it is explicitly intended that the command operate on the symbolic link "
10695 "instead of following the symbolic link, e.g., it is desired that I<chown "
10696 "slink> change the ownership of the file that I<slink> is, whether it is a "
10697 "symbolic link or not, the I<-h> option should be used.  In the above "
10698 "example, I<chown root slink> would change the ownership of the file referred "
10699 "to by I<slink>, while I<chown\\ -h root slink> would change the ownership of "
10700 "I<slink> itself."
10701 msgstr ""
10702
10703 #. type: Plain text
10704 #: build/C/man7/symlink.7:249
10705 msgid "There are some exceptions to this rule:"
10706 msgstr ""
10707
10708 #. type: Plain text
10709 #: build/C/man7/symlink.7:259
10710 msgid ""
10711 "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as "
10712 "arguments, but respectively attempt to rename and delete them.  (Note, if "
10713 "the symbolic link references a file via a relative path, moving it to "
10714 "another directory may very well cause it to stop working, since the path may "
10715 "no longer be correct.)"
10716 msgstr ""
10717
10718 #. type: Plain text
10719 #: build/C/man7/symlink.7:289
10720 msgid ""
10721 "The B<ls>(1)  command is also an exception to this rule.  For compatibility "
10722 "with historic systems (when B<ls>(1)  is not doing a tree walk, i.e., the "
10723 "I<-R> option is not specified), the B<ls>(1)  command follows symbolic links "
10724 "named as arguments if the I<-H> or I<-L> option is specified, or if the "
10725 "I<-F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is "
10726 "the only command where the I<-H> and I<-L> options affect its behavior even "
10727 "though it is not doing a walk of a file tree.)"
10728 msgstr ""
10729
10730 #
10731 #. The 4.4BSD system differs from historical 4BSD systems in that the
10732 #. .BR chown (1)
10733 #. and
10734 #. .BR chgrp (1)
10735 #. commands follow symbolic links specified on the command line.
10736 #. type: Plain text
10737 #: build/C/man7/symlink.7:307
10738 msgid ""
10739 "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  "
10740 "command does not follow symbolic links named as argument by default.  The "
10741 "B<file>(1)  command does follow symbolic links named as argument if the "
10742 "I<-L> option is specified."
10743 msgstr ""
10744
10745 #. type: SS
10746 #: build/C/man7/symlink.7:307
10747 #, no-wrap
10748 msgid "Commands traversing a file tree"
10749 msgstr ""
10750
10751 #. type: Plain text
10752 #: build/C/man7/symlink.7:320
10753 msgid ""
10754 "The following commands either optionally or always traverse file trees: "
10755 "B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), "
10756 "B<ls>(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
10757 msgstr ""
10758
10759 #. type: Plain text
10760 #: build/C/man7/symlink.7:324
10761 msgid ""
10762 "It is important to realize that the following rules apply equally to "
10763 "symbolic links encountered during the file tree traversal and symbolic links "
10764 "listed as command-line arguments."
10765 msgstr ""
10766
10767 #. type: Plain text
10768 #: build/C/man7/symlink.7:329
10769 msgid ""
10770 "The I<first rule> applies to symbolic links that reference files other than "
10771 "directories.  Operations that apply to symbolic links are performed on the "
10772 "links themselves, but otherwise the links are ignored."
10773 msgstr ""
10774
10775 #. type: Plain text
10776 #: build/C/man7/symlink.7:341
10777 msgid ""
10778 "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any "
10779 "symbolic links encountered in the tree traversal of I<directory>, because "
10780 "symbolic links may be removed.  In no case will B<rm>(1)  affect the file "
10781 "referred to by I<slink>."
10782 msgstr ""
10783
10784 #. type: Plain text
10785 #: build/C/man7/symlink.7:346
10786 msgid ""
10787 "The I<second rule> applies to symbolic links that refer to directories.  "
10788 "Symbolic links that refer to directories are never followed by default.  "
10789 "This is often referred to as a \"physical\" walk, as opposed to a "
10790 "\"logical\" walk (where symbolic links the refer to directories are "
10791 "followed)."
10792 msgstr ""
10793
10794 #. type: Plain text
10795 #: build/C/man7/symlink.7:349
10796 msgid ""
10797 "Certain conventions are (should be) followed as consistently as possible by "
10798 "commands that perform file tree walks:"
10799 msgstr ""
10800
10801 #. type: Plain text
10802 #: build/C/man7/symlink.7:362
10803 msgid ""
10804 "A command can be made to follow any symbolic links named on the command "
10805 "line, regardless of the type of file they reference, by specifying the I<-H> "
10806 "(for \"half-logical\") flag.  This flag is intended to make the command-line "
10807 "name space look like the logical name space.  (Note, for commands that do "
10808 "not always do file tree traversals, the I<-H> flag will be ignored if the "
10809 "I<-R> flag is not also specified.)"
10810 msgstr ""
10811
10812 #. type: Plain text
10813 #: build/C/man7/symlink.7:378
10814 msgid ""
10815 "For example, the command I<chown\\ -HR user slink> will traverse the file "
10816 "hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not "
10817 "the same as the previously discussed I<-h> flag.  The I<-H> flag causes "
10818 "symbolic links specified on the command line to be dereferenced for the "
10819 "purposes of both the action to be performed and the tree walk, and it is as "
10820 "if the user had specified the name of the file to which the symbolic link "
10821 "pointed."
10822 msgstr ""
10823
10824 #. type: Plain text
10825 #: build/C/man7/symlink.7:392
10826 msgid ""
10827 "A command can be made to follow any symbolic links named on the command "
10828 "line, as well as any symbolic links encountered during the traversal, "
10829 "regardless of the type of file they reference, by specifying the I<-L> (for "
10830 "\"logical\") flag.  This flag is intended to make the entire name space look "
10831 "like the logical name space.  (Note, for commands that do not always do file "
10832 "tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not "
10833 "also specified.)"
10834 msgstr ""
10835
10836 #. type: Plain text
10837 #: build/C/man7/symlink.7:407
10838 msgid ""
10839 "For example, the command I<chown\\ -LR user slink> will change the owner of "
10840 "the file referred to by I<slink>.  If I<slink> refers to a directory, "
10841 "B<chown> will traverse the file hierarchy rooted in the directory that it "
10842 "references.  In addition, if any symbolic links are encountered in any file "
10843 "tree that B<chown> traverses, they will be treated in the same fashion as "
10844 "I<slink>."
10845 msgstr ""
10846
10847 #. type: Plain text
10848 #: build/C/man7/symlink.7:414
10849 msgid ""
10850 "A command can be made to provide the default behavior by specifying the "
10851 "I<-P> (for \"physical\") flag.  This flag is intended to make the entire "
10852 "name space look like the physical name space."
10853 msgstr ""
10854
10855 #. type: Plain text
10856 #: build/C/man7/symlink.7:432
10857 msgid ""
10858 "For commands that do not by default do file tree traversals, the I<-H>, "
10859 "I<-L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  "
10860 "In addition, you may specify the I<-H>, I<-L>, and I<-P> options more than "
10861 "once; the last one specified determines the command's behavior.  This is "
10862 "intended to permit you to alias commands to behave one way or the other, and "
10863 "then override that behavior on the command line."
10864 msgstr ""
10865
10866 #. type: Plain text
10867 #: build/C/man7/symlink.7:438
10868 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
10869 msgstr ""
10870
10871 #. type: Plain text
10872 #: build/C/man7/symlink.7:451
10873 msgid ""
10874 "The B<rm>(1)  command operates on the symbolic link, and not the file it "
10875 "references, and therefore never follows a symbolic link.  The B<rm>(1)  "
10876 "command does not support the I<-H>, I<-L>, or I<-P> options."
10877 msgstr ""
10878
10879 #. type: Plain text
10880 #: build/C/man7/symlink.7:471
10881 msgid ""
10882 "To maintain compatibility with historic systems, the B<ls>(1)  command acts "
10883 "a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> "
10884 "options, B<ls>(1)  will follow symbolic links specified on the command "
10885 "line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, "
10886 "regardless of their type, whether specified on the command line or "
10887 "encountered in the tree walk."
10888 msgstr ""
10889
10890 #. type: Plain text
10891 #: build/C/man7/symlink.7:489
10892 msgid ""
10893 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), "
10894 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), "
10895 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), "
10896 "B<path_resolution>(7)"
10897 msgstr ""
10898
10899 #. type: TH
10900 #: build/C/man3/tempnam.3:25
10901 #, no-wrap
10902 msgid "TEMPNAM"
10903 msgstr ""
10904
10905 #. type: Plain text
10906 #: build/C/man3/tempnam.3:28
10907 msgid "tempnam - create a name for a temporary file"
10908 msgstr ""
10909
10910 #. type: Plain text
10911 #: build/C/man3/tempnam.3:33
10912 #, no-wrap
10913 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
10914 msgstr ""
10915
10916 #. type: Plain text
10917 #: build/C/man3/tempnam.3:42
10918 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
10919 msgstr ""
10920
10921 #. type: Plain text
10922 #: build/C/man3/tempnam.3:56
10923 msgid ""
10924 "The B<tempnam>()  function returns a pointer to a string that is a valid "
10925 "filename, and such that a file with this name did not exist when "
10926 "B<tempnam>()  checked.  The filename suffix of the pathname generated will "
10927 "start with I<pfx> in case I<pfx> is a non-NULL string of at most five "
10928 "bytes.  The directory prefix part of the pathname generated is required to "
10929 "be \"appropriate\" (often that at least implies writable)."
10930 msgstr ""
10931
10932 #. type: Plain text
10933 #: build/C/man3/tempnam.3:59
10934 msgid "Attempts to find an appropriate directory go through the following steps:"
10935 msgstr ""
10936
10937 #. type: TP
10938 #: build/C/man3/tempnam.3:59
10939 #, no-wrap
10940 msgid "a)"
10941 msgstr ""
10942
10943 #. type: Plain text
10944 #: build/C/man3/tempnam.3:65
10945 msgid ""
10946 "In case the environment variable B<TMPDIR> exists and contains the name of "
10947 "an appropriate directory, that is used."
10948 msgstr ""
10949
10950 #. type: TP
10951 #: build/C/man3/tempnam.3:65
10952 #, no-wrap
10953 msgid "b)"
10954 msgstr ""
10955
10956 #. type: Plain text
10957 #: build/C/man3/tempnam.3:70
10958 msgid "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
10959 msgstr ""
10960
10961 #. type: TP
10962 #: build/C/man3/tempnam.3:70
10963 #, no-wrap
10964 msgid "c)"
10965 msgstr ""
10966
10967 #. type: Plain text
10968 #: build/C/man3/tempnam.3:77
10969 msgid ""
10970 "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when "
10971 "appropriate."
10972 msgstr ""
10973
10974 #. type: TP
10975 #: build/C/man3/tempnam.3:77
10976 #, no-wrap
10977 msgid "d)"
10978 msgstr ""
10979
10980 #. type: Plain text
10981 #: build/C/man3/tempnam.3:80
10982 msgid "Finally an implementation-defined directory may be used."
10983 msgstr ""
10984
10985 #. type: Plain text
10986 #: build/C/man3/tempnam.3:87
10987 msgid ""
10988 "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and "
10989 "hence should be freed by B<free>(3)."
10990 msgstr ""
10991
10992 #. type: Plain text
10993 #: build/C/man3/tempnam.3:94
10994 msgid ""
10995 "On succes, the B<tempnam>()  function returns a pointer to a unique "
10996 "temporary filename.  It returns NULL if a unique name cannot be generated, "
10997 "with I<errno> set to indicate the cause of the error."
10998 msgstr ""
10999
11000 #. type: Plain text
11001 #: build/C/man3/tempnam.3:98
11002 msgid "Allocation of storage failed."
11003 msgstr ""
11004
11005 #. type: Plain text
11006 #: build/C/man3/tempnam.3:103
11007 msgid "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
11008 msgstr ""
11009
11010 #. type: Plain text
11011 #: build/C/man3/tempnam.3:122
11012 msgid ""
11013 "Although B<tempnam>()  generates names that are difficult to guess, it is "
11014 "nevertheless possible that between the time that B<tempnam>()  returns a "
11015 "pathname, and the time that the program opens it, another program might "
11016 "create that pathname using B<open>(2), or create it as a symbolic link.  "
11017 "This can lead to security holes.  To avoid such possibilities, use the "
11018 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
11019 "B<mkstemp>(3)  or B<tmpfile>(3)."
11020 msgstr ""
11021
11022 #. type: Plain text
11023 #: build/C/man3/tempnam.3:130
11024 msgid ""
11025 "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the "
11026 "program is not set-user-ID.  On SVr4, the directory used under B<d)> is "
11027 "I</tmp> (and this is what glibc does)."
11028 msgstr ""
11029
11030 #. type: Plain text
11031 #: build/C/man3/tempnam.3:135
11032 msgid ""
11033 "Because it dynamically allocates memory used to return the pathname, "
11034 "B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
11035 msgstr ""
11036
11037 #. type: Plain text
11038 #: build/C/man3/tempnam.3:148
11039 msgid ""
11040 "The B<tempnam>()  function generates a different string each time it is "
11041 "called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is "
11042 "called more than B<TMP_MAX> times, the behavior is implementation defined."
11043 msgstr ""
11044
11045 #. type: Plain text
11046 #: build/C/man3/tempnam.3:152
11047 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
11048 msgstr ""
11049
11050 #. type: Plain text
11051 #: build/C/man3/tempnam.3:158
11052 msgid ""
11053 "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> "
11054 "upon failure to find a unique name."
11055 msgstr ""
11056
11057 #. type: Plain text
11058 #: build/C/man3/tempnam.3:161
11059 msgid ""
11060 "The precise meaning of \"appropriate\" is undefined; it is unspecified how "
11061 "accessibility of a directory is determined."
11062 msgstr ""
11063
11064 #. type: Plain text
11065 #: build/C/man3/tempnam.3:168 build/C/man3/tmpnam.3:163
11066 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
11067 msgstr ""
11068
11069 #. type: Plain text
11070 #: build/C/man3/tempnam.3:173
11071 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
11072 msgstr ""
11073
11074 #. type: TH
11075 #: build/C/man3/tmpfile.3:31
11076 #, no-wrap
11077 msgid "TMPFILE"
11078 msgstr ""
11079
11080 #. type: Plain text
11081 #: build/C/man3/tmpfile.3:34
11082 msgid "tmpfile - create a temporary file"
11083 msgstr ""
11084
11085 #. type: Plain text
11086 #: build/C/man3/tmpfile.3:39
11087 #, no-wrap
11088 msgid "B<FILE *tmpfile(void);>\n"
11089 msgstr ""
11090
11091 #. type: Plain text
11092 #: build/C/man3/tmpfile.3:47
11093 msgid ""
11094 "The B<tmpfile>()  function opens a unique temporary file in binary "
11095 "read/write (w+b) mode.  The file will be automatically deleted when it is "
11096 "closed or the program terminates."
11097 msgstr ""
11098
11099 #. type: Plain text
11100 #: build/C/man3/tmpfile.3:56
11101 msgid ""
11102 "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique "
11103 "filename cannot be generated or the unique file cannot be opened.  In the "
11104 "latter case, I<errno> is set to indicate the error."
11105 msgstr ""
11106
11107 #. type: Plain text
11108 #: build/C/man3/tmpfile.3:60
11109 msgid "Search permission denied for directory in file's path prefix."
11110 msgstr ""
11111
11112 #. type: Plain text
11113 #: build/C/man3/tmpfile.3:63
11114 msgid "Unable to generate a unique filename."
11115 msgstr ""
11116
11117 #. type: Plain text
11118 #: build/C/man3/tmpfile.3:66
11119 msgid "The call was interrupted by a signal."
11120 msgstr ""
11121
11122 #. type: Plain text
11123 #: build/C/man3/tmpfile.3:69
11124 msgid "Too many file descriptors in use by the process."
11125 msgstr ""
11126
11127 #. type: Plain text
11128 #: build/C/man3/tmpfile.3:72
11129 msgid "Too many files open in the system."
11130 msgstr ""
11131
11132 #. type: Plain text
11133 #: build/C/man3/tmpfile.3:75
11134 msgid "There was no room in the directory to add the new filename."
11135 msgstr ""
11136
11137 #. type: Plain text
11138 #: build/C/man3/tmpfile.3:78
11139 msgid "Read-only file system."
11140 msgstr ""
11141
11142 #. type: Plain text
11143 #: build/C/man3/tmpfile.3:80
11144 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
11145 msgstr ""
11146
11147 #. type: Plain text
11148 #: build/C/man3/tmpfile.3:86
11149 msgid ""
11150 "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the "
11151 "stream cannot be opened."
11152 msgstr ""
11153
11154 #. type: Plain text
11155 #: build/C/man3/tmpfile.3:97
11156 msgid ""
11157 "The standard does not specify the directory that B<tmpfile>()  will use.  "
11158 "Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, "
11159 "and if that fails the directory I</tmp>."
11160 msgstr ""
11161
11162 #. type: Plain text
11163 #: build/C/man3/tmpfile.3:103
11164 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
11165 msgstr ""
11166
11167 #. type: TH
11168 #: build/C/man3/tmpnam.3:27
11169 #, no-wrap
11170 msgid "TMPNAM"
11171 msgstr ""
11172
11173 #. type: Plain text
11174 #: build/C/man3/tmpnam.3:30
11175 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
11176 msgstr ""
11177
11178 #. type: Plain text
11179 #: build/C/man3/tmpnam.3:35
11180 #, no-wrap
11181 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
11182 msgstr ""
11183
11184 #. type: Plain text
11185 #: build/C/man3/tmpnam.3:58
11186 msgid ""
11187 "The B<tmpnam>()  function returns a pointer to a string that is a valid "
11188 "filename, and such that a file with this name did not exist at some point in "
11189 "time, so that naive programmers may think it a suitable name for a temporary "
11190 "file.  If the argument I<s> is NULL this name is generated in an internal "
11191 "static buffer and may be overwritten by the next call to B<tmpnam>().  If "
11192 "I<s> is not NULL, the name is copied to the character array (of length at "
11193 "least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in "
11194 "case of success."
11195 msgstr ""
11196
11197 #. type: Plain text
11198 #: build/C/man3/tmpnam.3:70
11199 msgid ""
11200 "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both "
11201 "I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like "
11202 "the B<TMP_MAX> mentioned below.)"
11203 msgstr ""
11204
11205 #. type: Plain text
11206 #: build/C/man3/tmpnam.3:75
11207 msgid ""
11208 "The B<tmpnam>()  function returns a pointer to a unique temporary filename, "
11209 "or NULL if a unique name cannot be generated."
11210 msgstr ""
11211
11212 #. type: Plain text
11213 #: build/C/man3/tmpnam.3:77
11214 msgid "No errors are defined."
11215 msgstr ""
11216
11217 #. type: Plain text
11218 #: build/C/man3/tmpnam.3:83
11219 msgid ""
11220 "The B<tmpnam>()  function is thread-safe with exceptions.  It is not "
11221 "thread-safe if called with a NULL parameter."
11222 msgstr ""
11223
11224 #. type: Plain text
11225 #: build/C/man3/tmpnam.3:87
11226 msgid "The B<tmpnam_r>()  function is thread-safe."
11227 msgstr ""
11228
11229 #. type: Plain text
11230 #: build/C/man3/tmpnam.3:92
11231 msgid ""
11232 "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as "
11233 "obsolete."
11234 msgstr ""
11235
11236 #. type: Plain text
11237 #: build/C/man3/tmpnam.3:103
11238 msgid ""
11239 "The B<tmpnam>()  function generates a different string each time it is "
11240 "called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, "
11241 "the behavior is implementation defined."
11242 msgstr ""
11243
11244 #. type: Plain text
11245 #: build/C/man3/tmpnam.3:122
11246 msgid ""
11247 "Although B<tmpnam>()  generates names that are difficult to guess, it is "
11248 "nevertheless possible that between the time that B<tmpnam>()  returns a "
11249 "pathname, and the time that the program opens it, another program might "
11250 "create that pathname using B<open>(2), or create it as a symbolic link.  "
11251 "This can lead to security holes.  To avoid such possibilities, use the "
11252 "B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use "
11253 "B<mkstemp>(3)  or B<tmpfile>(3)."
11254 msgstr ""
11255
11256 #. type: Plain text
11257 #: build/C/man3/tmpnam.3:130
11258 msgid ""
11259 "Portable applications that use threads cannot call B<tmpnam>()  with a NULL "
11260 "argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is "
11261 "defined."
11262 msgstr ""
11263
11264 #. type: Plain text
11265 #: build/C/man3/tmpnam.3:134
11266 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
11267 msgstr ""
11268
11269 #. type: Plain text
11270 #: build/C/man3/tmpnam.3:142
11271 #, no-wrap
11272 msgid ""
11273 "char *\n"
11274 "tmpnam_r(char *s)\n"
11275 "{\n"
11276 "    return s ? tmpnam(s) : NULL;\n"
11277 "}\n"
11278 msgstr ""
11279
11280 #. type: Plain text
11281 #: build/C/man3/tmpnam.3:156
11282 msgid ""
11283 "apparently as a warning not to use NULL.  A few systems implement it.  To "
11284 "get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define "
11285 "B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
11286 msgstr ""
11287
11288 #. type: Plain text
11289 #: build/C/man3/tmpnam.3:168
11290 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
11291 msgstr ""
11292
11293 #. type: TH
11294 #: build/C/man2/unlink.2:32
11295 #, no-wrap
11296 msgid "UNLINK"
11297 msgstr ""
11298
11299 #. type: TH
11300 #: build/C/man2/unlink.2:32
11301 #, no-wrap
11302 msgid "2011-09-15"
11303 msgstr ""
11304
11305 #. type: Plain text
11306 #: build/C/man2/unlink.2:35
11307 msgid "unlink - delete a name and possibly the file it refers to"
11308 msgstr ""
11309
11310 #. type: Plain text
11311 #: build/C/man2/unlink.2:39
11312 msgid "B<int unlink(const char *>I<pathname>B<);>"
11313 msgstr ""
11314
11315 #. type: Plain text
11316 #: build/C/man2/unlink.2:45
11317 msgid ""
11318 "B<unlink>()  deletes a name from the file system.  If that name was the last "
11319 "link to a file and no processes have the file open the file is deleted and "
11320 "the space it was using is made available for reuse."
11321 msgstr ""
11322
11323 #. type: Plain text
11324 #: build/C/man2/unlink.2:49
11325 msgid ""
11326 "If the name was the last link to a file but any processes still have the "
11327 "file open the file will remain in existence until the last file descriptor "
11328 "referring to it is closed."
11329 msgstr ""
11330
11331 #. type: Plain text
11332 #: build/C/man2/unlink.2:51
11333 msgid "If the name referred to a symbolic link the link is removed."
11334 msgstr ""
11335
11336 #. type: Plain text
11337 #: build/C/man2/unlink.2:55
11338 msgid ""
11339 "If the name referred to a socket, fifo or device the name for it is removed "
11340 "but processes which have the object open may continue to use it."
11341 msgstr ""
11342
11343 #. type: Plain text
11344 #: build/C/man2/unlink.2:71
11345 msgid ""
11346 "Write access to the directory containing I<pathname> is not allowed for the "
11347 "process's effective UID, or one of the directories in I<pathname> did not "
11348 "allow search permission.  (See also B<path_resolution>(7).)"
11349 msgstr ""
11350
11351 #. type: Plain text
11352 #: build/C/man2/unlink.2:80
11353 msgid ""
11354 "The file I<pathname> cannot be unlinked because it is being used by the "
11355 "system or another process; for example, it is a mount point or the NFS "
11356 "client software created it to represent an active but otherwise nameless "
11357 "inode (\"NFS silly renamed\")."
11358 msgstr ""
11359
11360 #. type: Plain text
11361 #: build/C/man2/unlink.2:92
11362 msgid ""
11363 "I<pathname> refers to a directory.  (This is the non-POSIX value returned by "
11364 "Linux since 2.1.132.)"
11365 msgstr ""
11366
11367 #. type: Plain text
11368 #: build/C/man2/unlink.2:96
11369 msgid "Too many symbolic links were encountered in translating I<pathname>."
11370 msgstr ""
11371
11372 #. type: Plain text
11373 #: build/C/man2/unlink.2:106
11374 msgid ""
11375 "A component in I<pathname> does not exist or is a dangling symbolic link, or "
11376 "I<pathname> is empty."
11377 msgstr ""
11378
11379 #. type: Plain text
11380 #: build/C/man2/unlink.2:114
11381 msgid "A component used as a directory in I<pathname> is not, in fact, a directory."
11382 msgstr ""
11383
11384 #. type: Plain text
11385 #: build/C/man2/unlink.2:123
11386 msgid ""
11387 "The system does not allow unlinking of directories, or unlinking of "
11388 "directories requires privileges that the calling process doesn't have.  "
11389 "(This is the POSIX prescribed error return; as noted above, Linux returns "
11390 "B<EISDIR> for this case.)"
11391 msgstr ""
11392
11393 #. type: TP
11394 #: build/C/man2/unlink.2:123
11395 #, no-wrap
11396 msgid "B<EPERM> (Linux only)"
11397 msgstr ""
11398
11399 #. type: Plain text
11400 #: build/C/man2/unlink.2:126
11401 msgid "The file system does not allow unlinking of files."
11402 msgstr ""
11403
11404 #. type: Plain text
11405 #: build/C/man2/unlink.2:137
11406 msgid ""
11407 "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set "
11408 "and the process's effective UID is neither the UID of the file to be deleted "
11409 "nor that of the directory containing it, and the process is not privileged "
11410 "(Linux: does not have the B<CAP_FOWNER> capability)."
11411 msgstr ""
11412
11413 #. type: Plain text
11414 #: build/C/man2/unlink.2:141
11415 msgid "I<pathname> refers to a file on a read-only file system."
11416 msgstr ""
11417
11418 #. type: Plain text
11419 #: build/C/man2/unlink.2:161
11420 msgid ""
11421 "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), "
11422 "B<rmdir>(2), B<unlinkat>(2), B<mkfifo>(3), B<remove>(3), "
11423 "B<path_resolution>(7), B<symlink>(7)"
11424 msgstr ""
11425
11426 #. type: TH
11427 #: build/C/man3/unlocked_stdio.3:25
11428 #, no-wrap
11429 msgid "UNLOCKED_STDIO"
11430 msgstr ""
11431
11432 #. type: Plain text
11433 #: build/C/man3/unlocked_stdio.3:29
11434 msgid ""
11435 "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - "
11436 "nonlocking stdio functions"
11437 msgstr ""
11438
11439 #. type: Plain text
11440 #: build/C/man3/unlocked_stdio.3:37
11441 #, no-wrap
11442 msgid ""
11443 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
11444 "B<int getchar_unlocked(void);>\n"
11445 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
11446 "B<int putchar_unlocked(int >I<c>B<);>\n"
11447 msgstr ""
11448
11449 #. type: Plain text
11450 #: build/C/man3/unlocked_stdio.3:49
11451 #, no-wrap
11452 msgid ""
11453 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
11454 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
11455 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
11456 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
11457 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
11458 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
11459 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
11460 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t "
11461 ">I<n>B<,>\n"
11462 "B<                      FILE *>I<stream>B<);>\n"
11463 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t "
11464 ">I<n>B<,>\n"
11465 "B<                      FILE *>I<stream>B<);>\n"
11466 msgstr ""
11467
11468 #. type: Plain text
11469 #: build/C/man3/unlocked_stdio.3:52
11470 #, no-wrap
11471 msgid ""
11472 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
11473 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
11474 msgstr ""
11475
11476 #. type: Plain text
11477 #: build/C/man3/unlocked_stdio.3:63
11478 #, no-wrap
11479 msgid ""
11480 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
11481 "B<wint_t getwchar_unlocked(void);>\n"
11482 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
11483 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
11484 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
11485 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
11486 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE "
11487 "*>I<stream>B<);>\n"
11488 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
11489 msgstr ""
11490
11491 #. type: Plain text
11492 #: build/C/man3/unlocked_stdio.3:75
11493 msgid ""
11494 "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), "
11495 "B<putchar_unlocked>():"
11496 msgstr ""
11497
11498 #. type: Plain text
11499 #: build/C/man3/unlocked_stdio.3:78
11500 msgid ""
11501 "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || "
11502 "_BSD_SOURCE || _SVID_SOURCE"
11503 msgstr ""
11504
11505 #. type: Plain text
11506 #: build/C/man3/unlocked_stdio.3:89
11507 msgid ""
11508 "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), "
11509 "B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), "
11510 "B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
11511 msgstr ""
11512
11513 #. type: Plain text
11514 #: build/C/man3/unlocked_stdio.3:91
11515 msgid "_BSD_SOURCE || _SVID_SOURCE"
11516 msgstr ""
11517
11518 #. type: Plain text
11519 #: build/C/man3/unlocked_stdio.3:102
11520 msgid ""
11521 "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), "
11522 "B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), "
11523 "B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
11524 msgstr ""
11525
11526 #. type: Plain text
11527 #: build/C/man3/unlocked_stdio.3:113
11528 msgid ""
11529 "Each of these functions has the same behavior as its counterpart without the "
11530 "\"_unlocked\" suffix, except that they do not use locking (they do not set "
11531 "locks themselves, and do not test for the presence of locks set by others) "
11532 "and hence are thread-unsafe.  See B<flockfile>(3)."
11533 msgstr ""
11534
11535 #. type: Plain text
11536 #: build/C/man3/unlocked_stdio.3:120
11537 msgid ""
11538 "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), "
11539 "B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
11540 msgstr ""
11541
11542 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
11543 #.  moved to a compatibility library.
11544 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
11545 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
11546 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
11547 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
11548 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
11549 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
11550 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
11551 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
11552 #.  ungetc_unlocked, ungetwc_unlocked.
11553 #. type: Plain text
11554 #: build/C/man3/unlocked_stdio.3:136
11555 msgid ""
11556 "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and "
11557 "are available in recent glibc.  They should probably not be used."
11558 msgstr ""
11559
11560 #. type: Plain text
11561 #: build/C/man3/unlocked_stdio.3:139
11562 msgid "B<flockfile>(3), B<stdio>(3)"
11563 msgstr ""
11564
11565 #. type: TH
11566 #: build/C/man3/wprintf.3:16
11567 #, no-wrap
11568 msgid "WPRINTF"
11569 msgstr ""
11570
11571 #. type: TH
11572 #: build/C/man3/wprintf.3:16
11573 #, no-wrap
11574 msgid "2011-09-17"
11575 msgstr ""
11576
11577 #. type: Plain text
11578 #: build/C/man3/wprintf.3:20
11579 msgid ""
11580 "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted "
11581 "wide-character output conversion"
11582 msgstr ""
11583
11584 #. type: Plain text
11585 #: build/C/man3/wprintf.3:24
11586 #, no-wrap
11587 msgid ""
11588 "B<#include E<lt>stdio.hE<gt>>\n"
11589 "B<#include E<lt>wchar.hE<gt>>\n"
11590 msgstr ""
11591
11592 #. type: Plain text
11593 #: build/C/man3/wprintf.3:29
11594 #, no-wrap
11595 msgid ""
11596 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
11597 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
11598 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
11599 "B<             const wchar_t *>I<format>B<, ...);>\n"
11600 msgstr ""
11601
11602 #. type: Plain text
11603 #: build/C/man3/wprintf.3:34
11604 #, no-wrap
11605 msgid ""
11606 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
11607 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list "
11608 ">I<args>B<);>\n"
11609 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
11610 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
11611 msgstr ""
11612
11613 #.  .BR wprintf (),
11614 #.  .BR fwprintf (),
11615 #.  .BR swprintf (),
11616 #.  .BR vwprintf (),
11617 #.  .BR vfwprintf (),
11618 #.  .BR vswprintf ():
11619 #. type: Plain text
11620 #: build/C/man3/wprintf.3:51
11621 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
11622 msgstr ""
11623
11624 #. type: Plain text
11625 #: build/C/man3/wprintf.3:53
11626 msgid "_ISOC95_SOURCE /* Since glibc 2.12 */ ||"
11627 msgstr ""
11628
11629 #. type: Plain text
11630 #: build/C/man3/wprintf.3:55
11631 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
11632 msgstr ""
11633
11634 #. type: Plain text
11635 #: build/C/man3/wprintf.3:58
11636 msgid "or I<cc\\ -std=c99>"
11637 msgstr ""
11638
11639 #. type: Plain text
11640 #: build/C/man3/wprintf.3:69
11641 msgid ""
11642 "The B<wprintf>()  family of functions is the wide-character equivalent of "
11643 "the B<printf>(3)  family of functions.  It performs formatted output of wide "
11644 "characters."
11645 msgstr ""
11646
11647 #. type: Plain text
11648 #: build/C/man3/wprintf.3:81
11649 msgid ""
11650 "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output "
11651 "to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for "
11652 "more information."
11653 msgstr ""
11654
11655 #. type: Plain text
11656 #: build/C/man3/wprintf.3:93
11657 msgid ""
11658 "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character "
11659 "output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  "
11660 "for more information."
11661 msgstr ""
11662
11663 #. type: Plain text
11664 #: build/C/man3/wprintf.3:107
11665 msgid ""
11666 "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character "
11667 "output to an array of wide characters.  The programmer must ensure that "
11668 "there is room for at least I<maxlen> wide characters at I<wcs>."
11669 msgstr ""
11670
11671 #. type: Plain text
11672 #: build/C/man3/wprintf.3:118
11673 msgid ""
11674 "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), "
11675 "B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the "
11676 "following differences:"
11677 msgstr ""
11678
11679 #. type: TP
11680 #: build/C/man3/wprintf.3:118 build/C/man3/wprintf.3:123 build/C/man3/wprintf.3:126
11681 #, no-wrap
11682 msgid "B<\\(bu>"
11683 msgstr ""
11684
11685 #. type: Plain text
11686 #: build/C/man3/wprintf.3:123
11687 msgid "The I<format> string is a wide-character string."
11688 msgstr ""
11689
11690 #. type: Plain text
11691 #: build/C/man3/wprintf.3:126
11692 msgid "The output consists of wide characters, not bytes."
11693 msgstr ""
11694
11695 #. type: Plain text
11696 #: build/C/man3/wprintf.3:145
11697 msgid ""
11698 "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  "
11699 "and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a "
11700 "I<maxlen> argument, but these functions do not return -1 upon buffer "
11701 "overflow on Linux.)"
11702 msgstr ""
11703
11704 #. type: Plain text
11705 #: build/C/man3/wprintf.3:151
11706 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
11707 msgstr ""
11708
11709 #. type: Plain text
11710 #: build/C/man3/wprintf.3:165
11711 msgid ""
11712 "If no B<l> modifier is present, the I<int> argument is converted to a wide "
11713 "character by a call to the B<btowc>(3)  function, and the resulting wide "
11714 "character is written.  If an B<l> modifier is present, the I<wint_t> (wide "
11715 "character) argument is written."
11716 msgstr ""
11717
11718 #. type: Plain text
11719 #: build/C/man3/wprintf.3:205
11720 msgid ""
11721 "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected "
11722 "to be a pointer to an array of character type (pointer to a string) "
11723 "containing a multibyte character sequence beginning in the initial shift "
11724 "state.  Characters from the array are converted to wide characters (each by "
11725 "a call to the B<mbrtowc>(3)  function with a conversion state starting in "
11726 "the initial state before the first byte).  The resulting wide characters are "
11727 "written up to (but not including) the terminating null wide character "
11728 "(L\\(aq\\e0\\(aq).  If a precision is specified, no more wide characters "
11729 "than the number specified are written.  Note that the precision determines "
11730 "the number of I<wide characters> written, not the number of I<bytes> or "
11731 "I<screen positions>.  The array must contain a terminating null byte "
11732 "(\\(aq\\e0\\(aq), unless a precision is given and it is so small that the "
11733 "number of converted wide characters reaches it before the end of the array "
11734 "is reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> "
11735 "argument is expected to be a pointer to an array of wide characters.  Wide "
11736 "characters from the array are written up to (but not including) a "
11737 "terminating null wide character.  If a precision is specified, no more than "
11738 "the number specified are written.  The array must contain a terminating null "
11739 "wide character, unless a precision is given and it is smaller than or equal "
11740 "to the number of wide characters in the array."
11741 msgstr ""
11742
11743 #. type: Plain text
11744 #: build/C/man3/wprintf.3:213
11745 msgid ""
11746 "The functions return the number of wide characters written, excluding the "
11747 "terminating null wide character in case of the functions B<swprintf>()  and "
11748 "B<vswprintf>().  They return -1 when an error occurs."
11749 msgstr ""
11750
11751 #. type: Plain text
11752 #: build/C/man3/wprintf.3:215
11753 msgid "C99."
11754 msgstr ""
11755
11756 #. type: Plain text
11757 #: build/C/man3/wprintf.3:223
11758 msgid ""
11759 "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of "
11760 "the current locale."
11761 msgstr ""
11762
11763 #. type: Plain text
11764 #: build/C/man3/wprintf.3:253
11765 msgid ""
11766 "If the I<format> string contains non-ASCII wide characters, the program will "
11767 "work correctly only if the B<LC_CTYPE> category of the current locale at run "
11768 "time is the same as the B<LC_CTYPE> category of the current locale at "
11769 "compile time.  This is because the I<wchar_t> representation is platform- "
11770 "and locale-dependent.  (The glibc represents wide characters using their "
11771 "Unicode (ISO-10646) code point, but other platforms don't do this.  Also, "
11772 "the use of C99 universal character names of the form \\eunnnn does not solve "
11773 "this problem.)  Therefore, in internationalized programs, the I<format> "
11774 "string should consist of ASCII wide characters only, or should be "
11775 "constructed at run time in an internationalized way (e.g., using "
11776 "B<gettext>(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
11777 msgstr ""
11778
11779 #.  .BR wscanf (3)
11780 #. type: Plain text
11781 #: build/C/man3/wprintf.3:260
11782 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
11783 msgstr ""
11784
11785 #. type: TH
11786 #: build/C/man2/write.2:39
11787 #, no-wrap
11788 msgid "WRITE"
11789 msgstr ""
11790
11791 #. type: Plain text
11792 #: build/C/man2/write.2:42
11793 msgid "write - write to a file descriptor"
11794 msgstr ""
11795
11796 #. type: Plain text
11797 #: build/C/man2/write.2:46
11798 msgid "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
11799 msgstr ""
11800
11801 #. type: Plain text
11802 #: build/C/man2/write.2:54
11803 msgid ""
11804 "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to "
11805 "the file referred to by the file descriptor I<fd>."
11806 msgstr ""
11807
11808 #. type: Plain text
11809 #: build/C/man2/write.2:68
11810 msgid ""
11811 "The number of bytes written may be less than I<count> if, for example, there "
11812 "is insufficient space on the underlying physical medium, or the "
11813 "B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the "
11814 "call was interrupted by a signal handler after having written less than "
11815 "I<count> bytes.  (See also B<pipe>(7).)"
11816 msgstr ""
11817
11818 #. type: Plain text
11819 #: build/C/man2/write.2:82
11820 msgid ""
11821 "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for "
11822 "example, a regular file)  writing takes place at the current file offset, "
11823 "and the file offset is incremented by the number of bytes actually written.  "
11824 "If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set "
11825 "to the end of the file before writing.  The adjustment of the file offset "
11826 "and the write operation are performed as an atomic step."
11827 msgstr ""
11828
11829 #. type: Plain text
11830 #: build/C/man2/write.2:89
11831 msgid ""
11832 "POSIX requires that a B<read>(2)  which can be proved to occur after a "
11833 "B<write>()  has returned returns the new data.  Note that not all file "
11834 "systems are POSIX conforming."
11835 msgstr ""
11836
11837 #. type: Plain text
11838 #: build/C/man2/write.2:94
11839 msgid ""
11840 "On success, the number of bytes written is returned (zero indicates nothing "
11841 "was written).  On error, -1 is returned, and I<errno> is set appropriately."
11842 msgstr ""
11843
11844 #. type: Plain text
11845 #: build/C/man2/write.2:107
11846 msgid ""
11847 "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may "
11848 "return a failure status if one of the errors below is detected.  If no "
11849 "errors are detected, 0 will be returned without causing any other effect.  "
11850 "If I<count> is zero and I<fd> refers to a file other than a regular file, "
11851 "the results are not specified."
11852 msgstr ""
11853
11854 #. type: Plain text
11855 #: build/C/man2/write.2:115
11856 msgid ""
11857 "The file descriptor I<fd> refers to a file other than a socket and has been "
11858 "marked nonblocking (B<O_NONBLOCK>), and the write would block."
11859 msgstr ""
11860
11861 #.  Actually EAGAIN on Linux
11862 #. type: Plain text
11863 #: build/C/man2/write.2:126
11864 msgid ""
11865 "The file descriptor I<fd> refers to a socket and has been marked nonblocking "
11866 "(B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either "
11867 "error to be returned for this case, and does not require these constants to "
11868 "have the same value, so a portable application should check for both "
11869 "possibilities."
11870 msgstr ""
11871
11872 #. type: Plain text
11873 #: build/C/man2/write.2:130
11874 msgid "I<fd> is not a valid file descriptor or is not open for writing."
11875 msgstr ""
11876
11877 #. type: TP
11878 #: build/C/man2/write.2:130
11879 #, no-wrap
11880 msgid "B<EDESTADDRREQ>"
11881 msgstr ""
11882
11883 #. type: Plain text
11884 #: build/C/man2/write.2:135
11885 msgid ""
11886 "I<fd> refers to a datagram socket for which a peer address has not been set "
11887 "using B<connect>(2)."
11888 msgstr ""
11889
11890 #. type: Plain text
11891 #: build/C/man2/write.2:141
11892 msgid ""
11893 "The user's quota of disk blocks on the file system containing the file "
11894 "referred to by I<fd> has been exhausted."
11895 msgstr ""
11896
11897 #. type: Plain text
11898 #: build/C/man2/write.2:150
11899 msgid ""
11900 "An attempt was made to write a file that exceeds the implementation-defined "
11901 "maximum file size or the process's file size limit, or to write at a "
11902 "position past the maximum allowed offset."
11903 msgstr ""
11904
11905 #. type: Plain text
11906 #: build/C/man2/write.2:154
11907 msgid ""
11908 "The call was interrupted by a signal before any data was written; see "
11909 "B<signal>(7)."
11910 msgstr ""
11911
11912 #. type: Plain text
11913 #: build/C/man2/write.2:165
11914 msgid ""
11915 "I<fd> is attached to an object which is unsuitable for writing; or the file "
11916 "was opened with the B<O_DIRECT> flag, and either the address specified in "
11917 "I<buf>, the value specified in I<count>, or the current file offset is not "
11918 "suitably aligned."
11919 msgstr ""
11920
11921 #. type: Plain text
11922 #: build/C/man2/write.2:168
11923 msgid "A low-level I/O error occurred while modifying the inode."
11924 msgstr ""
11925
11926 #. type: Plain text
11927 #: build/C/man2/write.2:173
11928 msgid ""
11929 "The device containing the file referred to by I<fd> has no room for the "
11930 "data."
11931 msgstr ""
11932
11933 #. type: TP
11934 #: build/C/man2/write.2:173
11935 #, no-wrap
11936 msgid "B<EPIPE>"
11937 msgstr ""
11938
11939 #. type: Plain text
11940 #: build/C/man2/write.2:182
11941 msgid ""
11942 "I<fd> is connected to a pipe or socket whose reading end is closed.  When "
11943 "this happens the writing process will also receive a B<SIGPIPE> signal.  "
11944 "(Thus, the write return value is seen only if the program catches, blocks or "
11945 "ignores this signal.)"
11946 msgstr ""
11947
11948 #. type: Plain text
11949 #: build/C/man2/write.2:185
11950 msgid "Other errors may occur, depending on the object connected to I<fd>."
11951 msgstr ""
11952
11953 #. type: Plain text
11954 #: build/C/man2/write.2:194
11955 msgid ""
11956 "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not "
11957 "just before any data is written."
11958 msgstr ""
11959
11960 #. type: Plain text
11961 #: build/C/man2/write.2:203
11962 msgid ""
11963 "A successful return from B<write>()  does not make any guarantee that data "
11964 "has been committed to disk.  In fact, on some buggy implementations, it does "
11965 "not even guarantee that space has successfully been reserved for the data.  "
11966 "The only way to be sure is to call B<fsync>(2)  after you are done writing "
11967 "all your data."
11968 msgstr ""
11969
11970 #. type: Plain text
11971 #: build/C/man2/write.2:211
11972 msgid ""
11973 "If a B<write>()  is interrupted by a signal handler before any bytes are "
11974 "written, then the call fails with the error B<EINTR>; if it is interrupted "
11975 "after at least one byte has been written, the call succeeds, and returns the "
11976 "number of bytes written."
11977 msgstr ""
11978
11979 #. type: Plain text
11980 #: build/C/man2/write.2:223
11981 msgid ""
11982 "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), "
11983 "B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
11984 msgstr ""