Debian Codegraph @

templates/man3/fmemopen.3.pot

raw
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: 2026-06-05 06:24+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\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 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "fmemopen"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "fmemopen - open memory as stream"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid "B<#include E<lt>stdio.hE<gt>>\n"
77 msgstr ""
78
79 #. type: Plain text
80 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
81 #: opensuse-tumbleweed
82 #, no-wrap
83 msgid ""
84 "B<FILE *fmemopen(>size_t size;\n"
85 "B< void >I<buf>B<[>I<size>B<], size_t >I<size>B<, const char *>I<mode>B<);>\n"
86 msgstr ""
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 msgid ""
92 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
93 msgstr ""
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid "B<fmemopen>():"
99 msgstr ""
100
101 #. type: Plain text
102 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
103 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
104 #, no-wrap
105 msgid ""
106 " Since glibc 2.10:\n"
107 " _POSIX_C_SOURCE E<gt>= 200809L\n"
108 " Before glibc 2.10:\n"
109 " _GNU_SOURCE\n"
110 msgstr ""
111
112 #. type: SH
113 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
114 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
115 #, no-wrap
116 msgid "DESCRIPTION"
117 msgstr ""
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "The B<fmemopen>() function opens a stream that permits the access specified "
124 "by I<mode>. The stream allows I/O to be performed on the string or memory "
125 "buffer pointed to by I<buf>."
126 msgstr ""
127
128 #. type: Plain text
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 msgid ""
132 "The I<mode> argument specifies the semantics of I/O on the stream, and is "
133 "one of the following:"
134 msgstr ""
135
136 #. type: TP
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 #, no-wrap
140 msgid "I<r>"
141 msgstr ""
142
143 #. type: Plain text
144 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
145 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
146 msgid "The stream is opened for reading."
147 msgstr ""
148
149 #. type: TP
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 #, no-wrap
153 msgid "I<w>"
154 msgstr ""
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 msgid "The stream is opened for writing."
160 msgstr ""
161
162 #. type: TP
163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
165 #, no-wrap
166 msgid "I<a>"
167 msgstr ""
168
169 #. type: Plain text
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 msgid ""
173 "Append; open the stream for writing, with the initial buffer position set to "
174 "the first null byte."
175 msgstr ""
176
177 #. type: TP
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 #, no-wrap
181 msgid "I<r+>"
182 msgstr ""
183
184 #. type: Plain text
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 msgid "Open the stream for reading and writing."
188 msgstr ""
189
190 #. type: TP
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 #, no-wrap
194 msgid "I<w+>"
195 msgstr ""
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "Open the stream for reading and writing. The buffer contents are truncated "
202 "(i.e., \\[aq]\\[rs]0\\[aq] is placed in the first byte of the buffer)."
203 msgstr ""
204
205 #. type: TP
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 #, no-wrap
209 msgid "I<a+>"
210 msgstr ""
211
212 #. type: Plain text
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 msgid ""
216 "Append; open the stream for reading and writing, with the initial buffer "
217 "position set to the first null byte."
218 msgstr ""
219
220 #. type: Plain text
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 msgid ""
224 "The stream maintains the notion of a current position, the location where "
225 "the next I/O operation will be performed. The current position is "
226 "implicitly updated by I/O operations. It can be explicitly updated using "
227 "B<fseek>(3), and determined using B<ftell>(3). In all modes other than "
228 "append, the initial position is set to the start of the buffer. In append "
229 "mode, if no null byte is found within the buffer, then the initial position "
230 "is I<size+1>."
231 msgstr ""
232
233 #. type: Plain text
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 msgid ""
237 "If I<buf> is specified as NULL, then B<fmemopen>() allocates a buffer of "
238 "I<size> bytes. This is useful for an application that wants to write data "
239 "to a temporary buffer and then read it back again. The initial position is "
240 "set to the start of the buffer. The buffer is automatically freed when the "
241 "stream is closed. Note that the caller has no way to obtain a pointer to "
242 "the temporary buffer allocated by this call (but see B<open_memstream>(3))."
243 msgstr ""
244
245 #. type: Plain text
246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
248 msgid ""
249 "If I<buf> is not NULL, then it should point to a buffer of at least I<size> "
250 "bytes allocated by the caller."
251 msgstr ""
252
253 #. type: Plain text
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 msgid ""
257 "When a stream that has been opened for writing is flushed (B<fflush>(3)) or "
258 "closed (B<fclose>(3)), a null byte is written at the end of the buffer if "
259 "there is space. The caller should ensure that an extra byte is available in "
260 "the buffer (and that I<size> counts that byte) to allow for this."
261 msgstr ""
262
263 #. type: Plain text
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 msgid ""
267 "In a stream opened for reading, null bytes (\\[aq]\\[rs]0\\[aq]) in the "
268 "buffer do not cause read operations to return an end-of-file indication. A "
269 "read from the buffer will indicate end-of-file only when the current buffer "
270 "position advances I<size> bytes past the start of the buffer."
271 msgstr ""
272
273 #. type: Plain text
274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
276 msgid ""
277 "Write operations take place either at the current position (for modes other "
278 "than append), or at the current size of the stream (for append modes)."
279 msgstr ""
280
281 #. type: Plain text
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 msgid ""
285 "Attempts to write more than I<size> bytes to the buffer result in an error. "
286 "By default, such errors will be visible (by the absence of data) only when "
287 "the I<stdio> buffer is flushed. Disabling buffering with the following call "
288 "may be useful to detect errors at the time of an output operation:"
289 msgstr ""
290
291 #. type: Plain text
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "setbuf(stream, NULL);\n"
296 msgstr ""
297
298 #. type: SH
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 #, no-wrap
302 msgid "RETURN VALUE"
303 msgstr ""
304
305 #. type: Plain text
306 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
307 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
308 msgid ""
309 "Upon successful completion, B<fmemopen>() returns a I<FILE> pointer. "
310 "Otherwise, NULL is returned and I<errno> is set to indicate the error."
311 msgstr ""
312
313 #. type: SH
314 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
315 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
316 #, no-wrap
317 msgid "ATTRIBUTES"
318 msgstr ""
319
320 #. type: Plain text
321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
323 msgid ""
324 "For an explanation of the terms used in this section, see B<attributes>(7)."
325 msgstr ""
326
327 #. type: tbl table
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 #, no-wrap
331 msgid "Interface"
332 msgstr ""
333
334 #. type: tbl table
335 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
336 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
337 #, no-wrap
338 msgid "Attribute"
339 msgstr ""
340
341 #. type: tbl table
342 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
343 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
344 #, no-wrap
345 msgid "Value"
346 msgstr ""
347
348 #. type: tbl table
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid ".na\n"
353 msgstr ""
354
355 #. type: tbl table
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 #, no-wrap
359 msgid ".nh\n"
360 msgstr ""
361
362 #. type: tbl table
363 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
364 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
365 #, no-wrap
366 msgid "B<fmemopen>(),"
367 msgstr ""
368
369 #. type: tbl table
370 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
371 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
372 #, no-wrap
373 msgid "Thread safety"
374 msgstr ""
375
376 #. type: tbl table
377 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
378 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
379 #, no-wrap
380 msgid "MT-Safe"
381 msgstr ""
382
383 #. type: SH
384 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
385 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
386 #, no-wrap
387 msgid "STANDARDS"
388 msgstr ""
389
390 #. type: Plain text
391 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
392 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
393 msgid "POSIX.1-2008."
394 msgstr ""
395
396 #. type: SH
397 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
398 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
399 #, no-wrap
400 msgid "HISTORY"
401 msgstr ""
402
403 #. type: Plain text
404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
406 msgid "glibc 1.0.x. POSIX.1-2008."
407 msgstr ""
408
409 #. http://austingroupbugs.net/view.php?id=396
410 #. type: Plain text
411 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
412 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
413 msgid ""
414 "POSIX.1-2008 specifies that \\[aq]b\\[aq] in I<mode> shall be ignored. "
415 "However, Technical Corrigendum 1 adjusts the standard to allow "
416 "implementation-specific treatment for this case, thus permitting the glibc "
417 "treatment of \\[aq]b\\[aq]."
418 msgstr ""
419
420 #. type: Plain text
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 msgid ""
424 "With glibc 2.22, binary mode (see below) was removed, many longstanding bugs "
425 "in the implementation of B<fmemopen>() were fixed, and a new versioned "
426 "symbol was created for this interface."
427 msgstr ""
428
429 #. type: SS
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 #, no-wrap
433 msgid "Binary mode"
434 msgstr ""
435
436 #. type: Plain text
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 msgid ""
440 "From glibc 2.9 to glibc 2.21, the glibc implementation of B<fmemopen>() "
441 "supported a \"binary\" mode, enabled by specifying the letter \\[aq]b\\[aq] "
442 "as the second character in I<mode>. In this mode, writes don't implicitly "
443 "add a terminating null byte, and B<fseek>(3) B<SEEK_END> is relative to the "
444 "end of the buffer (i.e., the value specified by the I<size> argument), "
445 "rather than the current string length."
446 msgstr ""
447
448 #. http://sourceware.org/bugzilla/show_bug.cgi?id=12836
449 #. type: Plain text
450 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
451 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
452 msgid ""
453 "An API bug afflicted the implementation of binary mode: to specify binary "
454 "mode, the \\[aq]b\\[aq] must be the I<second> character in I<mode>. Thus, "
455 "for example, \"wb+\" has the desired effect, but \"w+b\" does not. This is "
456 "inconsistent with the treatment of I<mode> by B<fopen>(3)."
457 msgstr ""
458
459 #. type: Plain text
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 msgid ""
463 "Binary mode was removed in glibc 2.22; a \\[aq]b\\[aq] specified in I<mode> "
464 "has no effect."
465 msgstr ""
466
467 #. type: SH
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 #, no-wrap
471 msgid "NOTES"
472 msgstr ""
473
474 #. type: Plain text
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 msgid ""
478 "There is no file descriptor associated with the file stream returned by this "
479 "function (i.e., B<fileno>(3) will return an error if called on the returned "
480 "stream)."
481 msgstr ""
482
483 #. type: SH
484 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
485 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
486 #, no-wrap
487 msgid "BUGS"
488 msgstr ""
489
490 #. http://sourceware.org/bugzilla/show_bug.cgi?id=11216
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 msgid ""
495 "Before glibc 2.22, if I<size> is specified as zero, B<fmemopen>() fails "
496 "with the error B<EINVAL>. It would be more consistent if this case "
497 "successfully created a stream that then returned end-of-file on the first "
498 "attempt at reading; since glibc 2.22, the glibc implementation provides that "
499 "behavior."
500 msgstr ""
501
502 #. http://sourceware.org/bugzilla/show_bug.cgi?id=13152
503 #. type: Plain text
504 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
505 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
506 msgid ""
507 "Before glibc 2.22, specifying append mode (\"a\" or \"a+\") for "
508 "B<fmemopen>() sets the initial buffer position to the first null byte, but "
509 "(if the current position is reset to a location other than the end of the "
510 "stream) does not force subsequent writes to append at the end of the "
511 "stream. This bug is fixed in glibc 2.22."
512 msgstr ""
513
514 #. http://sourceware.org/bugzilla/show_bug.cgi?id=13151
515 #. type: Plain text
516 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
517 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
518 msgid ""
519 "Before glibc 2.22, if the I<mode> argument to B<fmemopen>() specifies "
520 "append (\"a\" or \"a+\"), and the I<size> argument does not cover a null "
521 "byte in I<buf>, then, according to POSIX.1-2008, the initial buffer position "
522 "should be set to the next byte after the end of the buffer. However, in "
523 "this case the glibc B<fmemopen>() sets the buffer position to -1. This bug "
524 "is fixed in glibc 2.22."
525 msgstr ""
526
527 #. https://sourceware.org/bugzilla/show_bug.cgi?id=14292
528 #. type: Plain text
529 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
530 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
531 msgid ""
532 "Before glibc 2.22, when a call to B<fseek>(3) with a I<whence> value of "
533 "B<SEEK_END> was performed on a stream created by B<fmemopen>(), the "
534 "I<offset> was I<subtracted> from the end-of-stream position, instead of "
535 "being added. This bug is fixed in glibc 2.22."
536 msgstr ""
537
538 #. http://sourceware.org/bugzilla/show_bug.cgi?id=6544
539 #. type: Plain text
540 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
541 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
542 msgid ""
543 "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>() silently "
544 "changed the ABI: previously, B<fmemopen>() ignored \\[aq]b\\[aq] in I<mode>."
545 msgstr ""
546
547 #. type: SH
548 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
549 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
550 #, no-wrap
551 msgid "EXAMPLES"
552 msgstr ""
553
554 #. type: Plain text
555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
557 msgid ""
558 "The program below uses B<fmemopen>() to open an input buffer, and "
559 "B<open_memstream>(3) to open a dynamically sized output buffer. The "
560 "program scans its input string (taken from the program's first command-line "
561 "argument) reading integers, and writes the squares of these integers to the "
562 "output buffer. An example of the output produced by this program is the "
563 "following:"
564 msgstr ""
565
566 #. type: Plain text
567 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
568 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
569 #, no-wrap
570 msgid ""
571 "$B< ./a.out \\[aq]1 23 43\\[aq]>\n"
572 "size=11; ptr=1 529 1849\n"
573 msgstr ""
574
575 #. type: SS
576 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
577 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
578 #, no-wrap
579 msgid "Program source"
580 msgstr ""
581
582 #. type: Plain text
583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
585 #, no-wrap
586 msgid ""
587 "#define _GNU_SOURCE\n"
588 "#include E<lt>err.hE<gt>\n"
589 "#include E<lt>stdio.hE<gt>\n"
590 "#include E<lt>stdlib.hE<gt>\n"
591 "#include E<lt>string.hE<gt>\n"
592 "\\&\n"
593 "int\n"
594 "main(int argc, char *argv[])\n"
595 "{\n"
596 " FILE *out, *in;\n"
597 " int v, s;\n"
598 " size_t size;\n"
599 " char *ptr;\n"
600 "\\&\n"
601 " if (argc != 2) {\n"
602 " fprintf(stderr, \"Usage: %s \\[aq]E<lt>numE<gt>...\\[aq]\\[rs]n\", argv[0]);\n"
603 " exit(EXIT_FAILURE);\n"
604 " }\n"
605 "\\&\n"
606 " in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
607 " if (in == NULL)\n"
608 " err(EXIT_FAILURE, \"fmemopen\");\n"
609 "\\&\n"
610 " out = open_memstream(&ptr, &size);\n"
611 " if (out == NULL)\n"
612 " err(EXIT_FAILURE, \"open_memstream\");\n"
613 "\\&\n"
614 " for (;;) {\n"
615 " s = fscanf(in, \"%d\", &v);\n"
616 " if (s E<lt>= 0)\n"
617 " break;\n"
618 "\\&\n"
619 " s = fprintf(out, \"%d \", v * v);\n"
620 " if (s == -1)\n"
621 " err(EXIT_FAILURE, \"fprintf\");\n"
622 " }\n"
623 "\\&\n"
624 " fclose(in);\n"
625 " fclose(out);\n"
626 "\\&\n"
627 " printf(\"size=%zu; ptr=%s\\[rs]n\", size, ptr);\n"
628 "\\&\n"
629 " free(ptr);\n"
630 " exit(EXIT_SUCCESS);\n"
631 "}\n"
632 msgstr ""
633
634 #. SRC END
635 #. type: SH
636 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
637 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
638 #, no-wrap
639 msgid "SEE ALSO"
640 msgstr ""
641
642 #. type: Plain text
643 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
644 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
645 msgid "B<fopen>(3), B<fopencookie>(3), B<open_memstream>(3)"
646 msgstr ""
647
648 #. type: TH
649 #: debian-trixie
650 #, no-wrap
651 msgid "2024-06-15"
652 msgstr ""
653
654 #. type: TH
655 #: debian-trixie
656 #, no-wrap
657 msgid "Linux man-pages 6.9.1"
658 msgstr ""
659
660 #. type: Plain text
661 #: debian-trixie
662 msgid "Standard C library (I<libc>, I<-lc>)"
663 msgstr ""
664
665 #. type: Plain text
666 #: debian-trixie fedora-44 fedora-rawhide
667 #, no-wrap
668 msgid "B<FILE *fmemopen(void >I<buf>B<[.>I<size>B<], size_t >I<size>B<, const char *>I<mode>B<);>\n"
669 msgstr ""
670
671 #. type: TH
672 #: fedora-44 fedora-rawhide
673 #, no-wrap
674 msgid "2024-07-23"
675 msgstr ""
676
677 #. type: TH
678 #: fedora-44 fedora-rawhide
679 #, no-wrap
680 msgid "Linux man-pages 6.13"
681 msgstr ""
682
683 #. type: TH
684 #: mageia-cauldron
685 #, no-wrap
686 msgid "Linux man-pages 6.17"
687 msgstr ""
688
689 #. type: TH
690 #: opensuse-leap-16-1 opensuse-tumbleweed
691 #, no-wrap
692 msgid "Linux man-pages (unreleased)"
693 msgstr ""