diff options
Diffstat (limited to '')
-rw-r--r-- | templates/man3/fmemopen.3.pot | 792 |
1 files changed, 792 insertions, 0 deletions
diff --git a/templates/man3/fmemopen.3.pot b/templates/man3/fmemopen.3.pot new file mode 100644 index 00000000..94839659 --- /dev/null +++ b/templates/man3/fmemopen.3.pot @@ -0,0 +1,792 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2024-03-01 16:56+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: TH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "fmemopen" +msgstr "" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "2023-10-31" +msgstr "" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "fmemopen - open memory as stream" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "LIBRARY" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Standard C library (I<libc>, I<-lc>)" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SYNOPSIS" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<#include E<lt>stdio.hE<gt>>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<FILE *fmemopen(void >I<buf>B<[.>I<size>B<], size_t >I<size>B<, const char *>I<mode>B<);>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "B<fmemopen>():" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +" Since glibc 2.10:\n" +" _POSIX_C_SOURCE E<gt>= 200809L\n" +" Before glibc 2.10:\n" +" _GNU_SOURCE\n" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "DESCRIPTION" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The B<fmemopen>() function opens a stream that permits the access specified " +"by I<mode>. The stream allows I/O to be performed on the string or memory " +"buffer pointed to by I<buf>." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<mode> argument specifies the semantics of I/O on the stream, and is " +"one of the following:" +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "I<r>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The stream is opened for reading." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "I<w>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The stream is opened for writing." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "I<a>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Append; open the stream for writing, with the initial buffer position set to " +"the first null byte." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "I<r+>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Open the stream for reading and writing." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "I<w+>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Open the stream for reading and writing. The buffer contents are truncated " +"(i.e., \\[aq]\\e0\\[aq] is placed in the first byte of the buffer)." +msgstr "" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "I<a+>" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Append; open the stream for reading and writing, with the initial buffer " +"position set to the first null byte." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The stream maintains the notion of a current position, the location where " +"the next I/O operation will be performed. The current position is " +"implicitly updated by I/O operations. It can be explicitly updated using " +"B<fseek>(3), and determined using B<ftell>(3). In all modes other than " +"append, the initial position is set to the start of the buffer. In append " +"mode, if no null byte is found within the buffer, then the initial position " +"is I<size+1>." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"If I<buf> is specified as NULL, then B<fmemopen>() allocates a buffer of " +"I<size> bytes. This is useful for an application that wants to write data " +"to a temporary buffer and then read it back again. The initial position is " +"set to the start of the buffer. The buffer is automatically freed when the " +"stream is closed. Note that the caller has no way to obtain a pointer to " +"the temporary buffer allocated by this call (but see B<open_memstream>(3))." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"If I<buf> is not NULL, then it should point to a buffer of at least I<size> " +"bytes allocated by the caller." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"When a stream that has been opened for writing is flushed (B<fflush>(3)) or " +"closed (B<fclose>(3)), a null byte is written at the end of the buffer if " +"there is space. The caller should ensure that an extra byte is available in " +"the buffer (and that I<size> counts that byte) to allow for this." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"In a stream opened for reading, null bytes (\\[aq]\\e0\\[aq]) in the buffer " +"do not cause read operations to return an end-of-file indication. A read " +"from the buffer will indicate end-of-file only when the current buffer " +"position advances I<size> bytes past the start of the buffer." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Write operations take place either at the current position (for modes other " +"than append), or at the current size of the stream (for append modes)." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Attempts to write more than I<size> bytes to the buffer result in an error. " +"By default, such errors will be visible (by the absence of data) only when " +"the I<stdio> buffer is flushed. Disabling buffering with the following call " +"may be useful to detect errors at the time of an output operation:" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "setbuf(stream, NULL);\n" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "RETURN VALUE" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Upon successful completion, B<fmemopen>() returns a I<FILE> pointer. " +"Otherwise, NULL is returned and I<errno> is set to indicate the error." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ATTRIBUTES" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"For an explanation of the terms used in this section, see B<attributes>(7)." +msgstr "" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Interface" +msgstr "" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Attribute" +msgstr "" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Value" +msgstr "" + +#. type: tbl table +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid ".na\n" +msgstr "" + +#. type: tbl table +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid ".nh\n" +msgstr "" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<fmemopen>()," +msgstr "" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Thread safety" +msgstr "" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "MT-Safe" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STANDARDS" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX.1-2008." +msgstr "" + +#. type: SH +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "HISTORY" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "glibc 1.0.x. POSIX.1-2008." +msgstr "" + +#. http://austingroupbugs.net/view.php?id=396 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"POSIX.1-2008 specifies that \\[aq]b\\[aq] in I<mode> shall be ignored. " +"However, Technical Corrigendum 1 adjusts the standard to allow " +"implementation-specific treatment for this case, thus permitting the glibc " +"treatment of \\[aq]b\\[aq]." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"With glibc 2.22, binary mode (see below) was removed, many longstanding bugs " +"in the implementation of B<fmemopen>() were fixed, and a new versioned " +"symbol was created for this interface." +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Binary mode" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"From glibc 2.9 to glibc 2.21, the glibc implementation of B<fmemopen>() " +"supported a \"binary\" mode, enabled by specifying the letter \\[aq]b\\[aq] " +"as the second character in I<mode>. In this mode, writes don't implicitly " +"add a terminating null byte, and B<fseek>(3) B<SEEK_END> is relative to the " +"end of the buffer (i.e., the value specified by the I<size> argument), " +"rather than the current string length." +msgstr "" + +#. http://sourceware.org/bugzilla/show_bug.cgi?id=12836 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"An API bug afflicted the implementation of binary mode: to specify binary " +"mode, the \\[aq]b\\[aq] must be the I<second> character in I<mode>. Thus, " +"for example, \"wb+\" has the desired effect, but \"w+b\" does not. This is " +"inconsistent with the treatment of I<mode> by B<fopen>(3)." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Binary mode was removed in glibc 2.22; a \\[aq]b\\[aq] specified in I<mode> " +"has no effect." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NOTES" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"There is no file descriptor associated with the file stream returned by this " +"function (i.e., B<fileno>(3) will return an error if called on the returned " +"stream)." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "BUGS" +msgstr "" + +#. http://sourceware.org/bugzilla/show_bug.cgi?id=11216 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Before glibc 2.22, if I<size> is specified as zero, B<fmemopen>() fails " +"with the error B<EINVAL>. It would be more consistent if this case " +"successfully created a stream that then returned end-of-file on the first " +"attempt at reading; since glibc 2.22, the glibc implementation provides that " +"behavior." +msgstr "" + +#. http://sourceware.org/bugzilla/show_bug.cgi?id=13152 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Before glibc 2.22, specifying append mode (\"a\" or \"a+\") for " +"B<fmemopen>() sets the initial buffer position to the first null byte, but " +"(if the current position is reset to a location other than the end of the " +"stream) does not force subsequent writes to append at the end of the " +"stream. This bug is fixed in glibc 2.22." +msgstr "" + +#. http://sourceware.org/bugzilla/show_bug.cgi?id=13151 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Before glibc 2.22, if the I<mode> argument to B<fmemopen>() specifies " +"append (\"a\" or \"a+\"), and the I<size> argument does not cover a null " +"byte in I<buf>, then, according to POSIX.1-2008, the initial buffer position " +"should be set to the next byte after the end of the buffer. However, in " +"this case the glibc B<fmemopen>() sets the buffer position to -1. This bug " +"is fixed in glibc 2.22." +msgstr "" + +#. https://sourceware.org/bugzilla/show_bug.cgi?id=14292 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Before glibc 2.22, when a call to B<fseek>(3) with a I<whence> value of " +"B<SEEK_END> was performed on a stream created by B<fmemopen>(), the " +"I<offset> was I<subtracted> from the end-of-stream position, instead of " +"being added. This bug is fixed in glibc 2.22." +msgstr "" + +#. http://sourceware.org/bugzilla/show_bug.cgi?id=6544 +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The glibc 2.9 addition of \"binary\" mode for B<fmemopen>() silently " +"changed the ABI: previously, B<fmemopen>() ignored \\[aq]b\\[aq] in I<mode>." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "EXAMPLES" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The program below uses B<fmemopen>() to open an input buffer, and " +"B<open_memstream>(3) to open a dynamically sized output buffer. The " +"program scans its input string (taken from the program's first command-line " +"argument) reading integers, and writes the squares of these integers to the " +"output buffer. An example of the output produced by this program is the " +"following:" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$B< ./a.out \\[aq]1 23 43\\[aq]>\n" +"size=11; ptr=1 529 1849\n" +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Program source" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid "" +"#define _GNU_SOURCE\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" FILE *out, *in;\n" +" int v, s;\n" +" size_t size;\n" +" char *ptr;\n" +"\\&\n" +" if (argc != 2) {\n" +" fprintf(stderr, \"Usage: %s \\[aq]E<lt>numE<gt>...\\[aq]\\en\", argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +"\\&\n" +" in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n" +" if (in == NULL)\n" +" err(EXIT_FAILURE, \"fmemopen\");\n" +"\\&\n" +" out = open_memstream(&ptr, &size);\n" +" if (out == NULL)\n" +" err(EXIT_FAILURE, \"open_memstream\");\n" +"\\&\n" +" for (;;) {\n" +" s = fscanf(in, \"%d\", &v);\n" +" if (s E<lt>= 0)\n" +" break;\n" +"\\&\n" +" s = fprintf(out, \"%d \", v * v);\n" +" if (s == -1)\n" +" err(EXIT_FAILURE, \"fprintf\");\n" +" }\n" +"\\&\n" +" fclose(in);\n" +" fclose(out);\n" +"\\&\n" +" printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n" +"\\&\n" +" free(ptr);\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. SRC END +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SEE ALSO" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "B<fopen>(3), B<fopencookie>(3), B<open_memstream>(3)" +msgstr "" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "2023-02-05" +msgstr "" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "Linux man-pages 6.03" +msgstr "" + +#. type: SH +#: debian-bookworm +#, no-wrap +msgid "VERSIONS" +msgstr "" + +#. type: Plain text +#: debian-bookworm +msgid "B<fmemopen>() was already available in glibc 1.0.x." +msgstr "" + +#. type: Plain text +#: debian-bookworm +msgid "" +"POSIX.1-2008. This function is not specified in POSIX.1-2001, and is not " +"widely available on other systems." +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define _GNU_SOURCE\n" +"#include E<lt>err.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" FILE *out, *in;\n" +" int v, s;\n" +" size_t size;\n" +" char *ptr;\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (argc != 2) {\n" +" fprintf(stderr, \"Usage: %s \\[aq]E<lt>numE<gt>...\\[aq]\\en\", argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n" +" if (in == NULL)\n" +" err(EXIT_FAILURE, \"fmemopen\");\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" out = open_memstream(&ptr, &size);\n" +" if (out == NULL)\n" +" err(EXIT_FAILURE, \"open_memstream\");\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" for (;;) {\n" +" s = fscanf(in, \"%d\", &v);\n" +" if (s E<lt>= 0)\n" +" break;\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = fprintf(out, \"%d \", v * v);\n" +" if (s == -1)\n" +" err(EXIT_FAILURE, \"fprintf\");\n" +" }\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" fclose(in);\n" +" fclose(out);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" free(ptr);\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "2023-07-20" +msgstr "" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages 6.05.01" +msgstr "" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "2023-03-30" +msgstr "" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "Linux man-pages 6.04" +msgstr "" |