# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-06-01 05:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \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 debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" 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, 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 Estdio.hE>\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 "BIB<[.>IB<], size_t >IB<, const char *>IB<);>\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(7)):" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B():" 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= 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() function opens a stream that permits the access specified " "by I. The stream allows I/O to be performed on the string or memory " "buffer pointed to by I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I 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" 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" 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" 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" 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" 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" 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(3), and determined using B(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." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If I is specified as NULL, then B() allocates a buffer of " "I 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(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 is not NULL, then it should point to a buffer of at least I " "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(3)) or " "closed (B(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 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 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 bytes to the buffer result in an error. " "By default, such errors will be visible (by the absence of data) only when " "the I 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() returns a I pointer. " "Otherwise, NULL is returned and I 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(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()," 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 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() 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() " "supported a \"binary\" mode, enabled by specifying the letter \\[aq]b\\[aq] " "as the second character in I. In this mode, writes don't implicitly " "add a terminating null byte, and B(3) B is relative to the " "end of the buffer (i.e., the value specified by the I 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 character in I. Thus, " "for example, \"wb+\" has the desired effect, but \"w+b\" does not. This is " "inconsistent with the treatment of I by B(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 " "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(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 is specified as zero, B() fails " "with the error B. 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() 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 argument to B() specifies " "append (\"a\" or \"a+\"), and the I argument does not cover a null " "byte in I, 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() 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(3) with a I value of " "B was performed on a stream created by B(), the " "I was I 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() silently " "changed the ABI: previously, B() ignored \\[aq]b\\[aq] in I." 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() to open an input buffer, and " "B(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 Eerr.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\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]EnumE...\\[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= 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(3), B(3), B(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() 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 Eerr.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\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]EnumE...\\[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= 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 #: fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" 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 "" #. type: TH #: opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr ""