# 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: 2026-06-05 06:24+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-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "fread" msgstr "" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-10" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "fread, fwrite - binary stream input/output" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Estdio.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "Bsize_t size, size_t n;\n" "B< void >IB<[restrict >IB< * >IB<],>\n" "B< size_t >IB<, size_t >IB<,>\n" "B< FILE *restrict >IB<);>\n" "Bsize_t size, size_t n;\n" "B< const void >IB<[restrict >IB< * >IB<],>\n" "B< size_t >IB<, size_t >IB<,>\n" "B< FILE *restrict >IB<);>\n" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The function B() reads I items of data, each I bytes long, " "from the stream pointed to by I, storing them at the location given " "by I." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The function B() writes I items of data, each I bytes " "long, to the stream pointed to by I, obtaining them from the " "location given by I." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "For nonlocking counterparts, see B(3)." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On success, B() and B() return the number of items read or " "written. This number equals the number of bytes transferred only when " "I is 1. If an error occurs, or the end of the file is reached, the " "return value is a short item count (or zero)." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The file position indicator for the stream is advanced by the number of " "bytes successfully read or written." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B() does not distinguish between end-of-file and error, and callers " "must use B(3) and B(3) to determine which occurred." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B()" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "C11, POSIX.1-2008." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2001, C89." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The program below demonstrates the use of B() by parsing /bin/sh ELF " "executable in binary mode and printing its magic and class:" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "$B< ./a.out>;\n" "ELF magic: 0x7f454c46\n" "Class: 0x02\n" msgstr "" #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Program source" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "#include Estdcountof.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " FILE *fp;\n" " size_t ret;\n" " unsigned char buffer[4];\n" "\\&\n" " fp = fopen(\"/bin/sh\", \"rb\");\n" " if (!fp) {\n" " perror(\"fopen\");\n" " return EXIT_FAILURE;\n" " }\n" "\\&\n" " ret = fread(buffer, sizeof(*buffer), countof(buffer), fp);\n" " if (ret != countof(buffer)) {\n" " fprintf(stderr, \"fread() failed: %zu\\[rs]n\", ret);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"ELF magic: %#04x%02x%02x%02x\\[rs]n\", buffer[0], buffer[1],\n" " buffer[2], buffer[3]);\n" "\\&\n" " ret = fread(buffer, 1, 1, fp);\n" " if (ret != 1) {\n" " fprintf(stderr, \"fread() failed: %zu\\[rs]n\", ret);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"Class: %#04x\\[rs]n\", buffer[0]);\n" "\\&\n" " fclose(fp);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B(2), B(2), B(3), B(3), B(3)" msgstr "" #. type: TH #: debian-trixie #, no-wrap msgid "2024-06-15" msgstr "" #. type: TH #: debian-trixie #, no-wrap msgid "Linux man-pages 6.9.1" msgstr "" #. type: Plain text #: debian-trixie msgid "Standard C library (I, I<-lc>)" msgstr "" #. type: Plain text #: debian-trixie #, no-wrap msgid "" "BIB<[restrict .>IB< * .>IB<],>\n" "B< size_t >IB<, size_t >IB<,>\n" "B< FILE *restrict >IB<);>\n" "BIB<[restrict .>IB< * .>IB<],>\n" "B< size_t >IB<, size_t >IB<,>\n" "B< FILE *restrict >IB<);>\n" msgstr "" #. type: Plain text #: debian-trixie msgid "" "The function B() reads I items of data, each I bytes " "long, from the stream pointed to by I, storing them at the location " "given by I." msgstr "" #. type: Plain text #: debian-trixie msgid "" "The function B() writes I items of data, each I bytes " "long, to the stream pointed to by I, obtaining them from the " "location given by I." msgstr "" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "$ B<./a.out>\n" "ELF magic: 0x7f454c46\n" "Class: 0x02\n" msgstr "" #. type: Plain text #: debian-trixie fedora-44 fedora-rawhide #, no-wrap msgid "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "\\&\n" "#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))\n" "\\&\n" "int\n" "main(void)\n" "{\n" " FILE *fp;\n" " size_t ret;\n" " unsigned char buffer[4];\n" "\\&\n" " fp = fopen(\"/bin/sh\", \"rb\");\n" " if (!fp) {\n" " perror(\"fopen\");\n" " return EXIT_FAILURE;\n" " }\n" "\\&\n" " ret = fread(buffer, sizeof(*buffer), ARRAY_SIZE(buffer), fp);\n" " if (ret != ARRAY_SIZE(buffer)) {\n" " fprintf(stderr, \"fread() failed: %zu\\[rs]n\", ret);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"ELF magic: %#04x%02x%02x%02x\\[rs]n\", buffer[0], buffer[1],\n" " buffer[2], buffer[3]);\n" "\\&\n" " ret = fread(buffer, 1, 1, fp);\n" " if (ret != 1) {\n" " fprintf(stderr, \"fread() failed: %zu\\[rs]n\", ret);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " printf(\"Class: %#04x\\[rs]n\", buffer[0]);\n" "\\&\n" " fclose(fp);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "2024-11-17" msgstr "" #. type: TH #: fedora-44 fedora-rawhide #, no-wrap msgid "Linux man-pages 6.13" msgstr "" #. type: Plain text #: fedora-44 fedora-rawhide #, no-wrap msgid "" "BIB<[restrict .>IB< * .>IB<],>\n" "B< size_t >IB<, size_t >IB<,>\n" "B< FILE *restrict >IB<);>\n" "BIB<[restrict .>IB< * .>IB<],>\n" "B< size_t >IB<, size_t >IB<,>\n" "B< FILE *restrict >IB<);>\n" msgstr "" #. type: TH #: mageia-cauldron #, no-wrap msgid "Linux man-pages 6.17" msgstr "" #. type: TH #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr ""