# 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 06:09+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 "printf" 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 "" "printf, fprintf, dprintf, sprintf, snprintf, vprintf, vfprintf, vdprintf, " "vsprintf, vsnprintf - formatted output conversion" 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<, ...);>\n" "BIB<,>\n" "B< const char *restrict >IB<, ...);>\n" "BIB<,>\n" "B< const char *restrict >IB<, ...);>\n" "BIB<,>\n" "B< const char *restrict >IB<, ...);>\n" "BIB<[restrict .>IB<], size_t >IB<,>\n" "B< const char *restrict >IB<, ...);>\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<, va_list >IB<);>\n" "BIB<,>\n" "B< const char *restrict >IB<, va_list >IB<);>\n" "BIB<,>\n" "B< const char *restrict >IB<, va_list >IB<);>\n" "BIB<,>\n" "B< const char *restrict >IB<, va_list >IB<);>\n" "BIB<[restrict .>IB<], size_t >IB<,>\n" "B< const char *restrict >IB<, va_list >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(), 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 "" " _XOPEN_SOURCE E= 500 || _ISOC99_SOURCE\n" " || /* glibc E= 2.19: */ _BSD_SOURCE\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(), 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 functions in the B() family produce output according to a " "I as described below. The functions B() and B() " "write output to I, the standard output stream; B() and " "B() write output to the given output I; B(), " "B(), B(), and B() write to the character " "string I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The function B() is the same as B() except that it " "outputs to a file descriptor, I, instead of to a B(3) stream." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The functions B() and B() write at most I bytes " "(including the terminating null byte (\\[aq]\\e0\\[aq])) to I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The functions B(), B(), B(), B(), " "B() are equivalent to the functions B(), B(), " "B(), B(), B(), respectively, except that they " "are called with a I instead of a variable number of arguments. " "These functions do not call the I macro. Because they invoke the " "I macro, the value of I is undefined after the call. 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 "" "All of these functions write the output under the control of a I " "string that specifies how subsequent arguments (or arguments accessed via " "the variable-length argument facilities of B(3)) are converted for " "output." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "C99 and POSIX.1-2001 specify that the results are undefined if a call to " "B(), B(), B(), or B() would cause " "copying to take place between objects that overlap (e.g., if the target " "string array and one of the supplied input arguments refer to the same " "buffer). See CAVEATS." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Format of the format string" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The format string is a character string, beginning and ending in its initial " "shift state, if any. The format string is composed of zero or more " "directives: ordinary characters (not B<%>), which are copied unchanged to " "the output stream; and conversion specifications, each of which results in " "fetching zero or more subsequent arguments. Each conversion specification " "is introduced by the character B<%>, and ends with a I. In between there may be (in this order) zero or more I, " "an optional minimum I, an optional I and an optional " "I." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The overall syntax of a conversion specification is:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "%[$][flags][width][.precision][length modifier]conversion\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The arguments must correspond properly (after type promotion) with the " "conversion specifier. By default, the arguments are used in the order " "given, where each \\[aq]*\\[aq] (see I and I below) " "and each conversion specifier asks for the next argument (and it is an error " "if insufficiently many arguments are given). One can also specify " "explicitly which argument is taken, at each place where an argument is " "required, by writing \"%m$\" instead of \\[aq]%\\[aq] and \"*m$\" instead of " "\\[aq]*\\[aq], where the decimal integer I denotes the position in the " "argument list of the desired argument, indexed starting from 1. Thus," msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "printf(\"%*d\", width, num);\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "and" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "printf(\"%2$*1$d\", width, num);\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "are equivalent. The second style allows repeated references to the same " "argument. The C99 standard does not include the style using \\[aq]$\\[aq], " "which comes from the Single UNIX Specification. If the style using \\[aq]$" "\\[aq] is used, it must be used throughout for all conversions taking an " "argument and all width and precision arguments, but it may be mixed with \"%%" "\" formats, which do not consume an argument. There may be no gaps in the " "numbers of arguments specified using \\[aq]$\\[aq]; for example, if " "arguments 1 and 3 are specified, argument 2 must also be specified somewhere " "in the format string." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "For some numeric conversions a radix character (\"decimal point\") or " "thousands' grouping character is used. The actual character used depends on " "the B part of the locale. (See B(3).) The POSIX " "locale uses \\[aq].\\[aq] as radix character, and does not have a grouping " "character. Thus," msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "printf(\"%\\[aq].2f\", 1234567.89);\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the " "nl_NL locale, and in \"1.234.567,89\" in the da_DK locale." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Flag characters" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The character % is followed by zero or more of the following flags:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<#>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value should be converted to an \"alternate form\". For B " "conversions, the first character of the output string is made zero (by " "prefixing a 0 if it was not zero already). For B and B conversions, a " "nonzero result has the string \"0x\" (or \"0X\" for B conversions) " "prepended to it. For B, B, B, B, B, B, B, and B " "conversions, the result will always contain a decimal point, even if no " "digits follow it (normally, a decimal point appears in the results of those " "conversions only if a digit follows). For B and B conversions, " "trailing zeros are not removed from the result as they would otherwise be. " "For B, if I contains a valid error code, the output of " "I is printed; otherwise, the value stored in " "I is printed as a decimal number. For other conversions, the result " "is undefined." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<\\&0>" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The value should be zero padded. For B, B, B, B, B, B, " "B, B, B, B, B, B, B, and B conversions, the " "converted value is padded on the left with zeros rather than blanks. If the " "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored. If a " "precision is given with an integer conversion (B, B, B, B, B, " "and B), the B<\\&0> flag is ignored. For other conversions, the behavior " "is undefined." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<->" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The converted value is to be left adjusted on the field boundary. (The " "default is right justification.) The converted value is padded on the right " "with blanks, rather than on the left with blanks or zeros. A B<-> overrides " "a B<\\&0> if both are given." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<\\[aq] \\[aq]>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<+>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A sign (+ or -) should always be placed before a number produced by a signed " "conversion. By default, a sign is used only for negative numbers. A B<+> " "overrides a space if both are used." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The five flag characters above are defined in the C99 standard. The Single " "UNIX Specification specifies one further flag character." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<\\[aq]>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "For decimal conversion (B, B, B, B, B, B, B) the " "output is to be grouped with thousands' grouping characters if the locale " "information indicates any. (See B(3).) Note that many versions " "of B(1) cannot parse this option and will issue a warning. (SUSv2 did " "not include I<%\\[aq]F>, but SUSv3 added it.) Note also that the default " "locale of a C program is \"C\" whose locale information indicates no " "thousands' grouping character. Therefore, without a prior call to " "B(3), no thousands' grouping characters will be printed." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "glibc 2.2 adds one further flag character." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. outdigits keyword in locale file #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "For decimal integer conversion (B, B, B) the output uses the " "locale's alternative output digits, if any. For example, since glibc 2.2.3 " "this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Field width" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "An optional decimal digit string (with nonzero first digit) specifying a " "minimum field width. If the converted value has fewer characters than the " "field width, it will be padded with spaces on the left (or right, if the " "left-adjustment flag has been given). Instead of a decimal digit string one " "may write \"*\" or \"*m$\" (for some decimal integer I) to specify that " "the field width is given in the next argument, or in the I-th argument, " "respectively, which must be of type I. A negative field width is taken " "as a \\[aq]-\\[aq] flag followed by a positive field width. In no case does " "a nonexistent or small field width cause truncation of a field; if the " "result of a conversion is wider than the field width, the field is expanded " "to contain the conversion result." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Precision" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "An optional precision, in the form of a period (\\[aq].\\[aq]) followed by " "an optional decimal digit string. Instead of a decimal digit string one may " "write \"*\" or \"*m$\" (for some decimal integer I) to specify that the " "precision is given in the next argument, or in the I-th argument, " "respectively, which must be of type I. If the precision is given as " "just \\[aq].\\[aq], the precision is taken to be zero. A negative precision " "is taken as if the precision were omitted. This gives the minimum number of " "digits to appear for B, B, B, B, B, and B conversions, the " "number of digits to appear after the radix character for B, B, B, " "B, B, and B conversions, the maximum number of significant digits " "for B and B conversions, or the maximum number of characters to be " "printed from a string for B and B conversions." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Length modifier" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Here, \"integer conversion\" stands for B, B, B, B, B, or " "B conversion." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A following integer conversion corresponds to a I or I argument, or a following B conversion corresponds to a pointer to a " "I argument." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A following integer conversion corresponds to a I or I argument, or a following B conversion corresponds to a pointer to " "a I argument." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(ell) A following integer conversion corresponds to a I or I argument, or a following B conversion corresponds to a pointer to a " "I argument, or a following B conversion corresponds to a I " "argument, or a following B conversion corresponds to a pointer to " "I argument. On a following B, B, B, B, B, B, " "B, or B conversion, this length modifier is ignored (C99; not in " "SUSv2)." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(ell-ell). A following integer conversion corresponds to a I or " "I argument, or a following B conversion corresponds " "to a pointer to a I argument." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A synonym for B. This is a nonstandard extension, derived from BSD; " "avoid its use in new code." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A following B, B, B, B, B, B, B, or B conversion " "corresponds to a I argument. (C99 allows %LF, but SUSv2 does " "not.)" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A following integer conversion corresponds to an I or I " "argument, or a following B conversion corresponds to a pointer to an " "I argument." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A following integer conversion corresponds to a I or I " "argument, or a following B conversion corresponds to a pointer to a " "I argument." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A nonstandard synonym for B that predates the appearance of B. Do not " "use in new code." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A following integer conversion corresponds to a I argument, or a " "following B conversion corresponds to a pointer to a I " "argument." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "SUSv3 specifies all of the above, except for those modifiers explicitly " "noted as being nonstandard extensions. SUSv2 specified only the length " "modifiers B (in B, B, B, B, B, B) and B (in " "B, B
  • , B, B, B, B, B, B) and B (in B, " "B, B, B, B)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "As a nonstandard extension, the GNU implementations treats B and B as " "synonyms, so that one can, for example, write B (as a synonym for the " "standards-compliant B) and B (as a synonym for the standards " "compliant B). Such usage is nonportable." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Conversion specifiers" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A character that specifies the type of conversion to be applied. The " "conversion specifiers and their meanings are:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B, B" 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 is converted to signed decimal notation. The precision, " "if any, gives the minimum number of digits that must appear; if the " "converted value requires fewer digits, it is padded on the left with zeros. " "The default precision is 1. When 0 is printed with an explicit precision 0, " "the output is empty." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B, B, B, B" 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 is converted to unsigned octal (B), unsigned " "decimal (B), or unsigned hexadecimal (B and B) notation. The " "letters B are used for B conversions; the letters B are " "used for B conversions. The precision, if any, gives the minimum number " "of digits that must appear; if the converted value requires fewer digits, it " "is padded on the left with zeros. The default precision is 1. When 0 is " "printed with an explicit precision 0, the output is empty." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B, B" 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 is rounded and converted in the style [-]dB<\\&." ">dddB\\(+-dd where there is one digit (which is nonzero if the argument " "is nonzero) before the decimal-point character and the number of digits " "after it is equal to the precision; if the precision is missing, it is taken " "as 6; if the precision is zero, no decimal-point character appears. An B " "conversion uses the letter B (rather than B) to introduce the " "exponent. The exponent always contains at least two digits; if the value is " "zero, the exponent is 00." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B, B" 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 is rounded and converted to decimal notation in the " "style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point " "character is equal to the precision specification. If the precision is " "missing, it is taken as 6; if the precision is explicitly zero, no decimal-" "point character appears. If a decimal point appears, at least one digit " "appears before it." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(SUSv2 does not know about B and says that character string " "representations for infinity and NaN may be made available. SUSv3 adds a " "specification for B. The C99 standard specifies \"[-]inf\" or " "\"[-]infinity\" for infinity, and a string starting with \"nan\" for NaN, in " "the case of B conversion, and \"[-]INF\" or \"[-]INFINITY\" or \"NAN\" in " "the case of B conversion.)" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B, B" 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 is converted in style B or B (or B or B " "for B conversions). The precision specifies the number of significant " "digits. If the precision is missing, 6 digits are given; if the precision " "is zero, it is treated as 1. Style B is used if the exponent from its " "conversion is less than -4 or greater than or equal to the precision. " "Trailing zeros are removed from the fractional part of the result; a decimal " "point appears only if it is followed by at least one digit." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B, B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(C99; not in SUSv2, but added in SUSv3) For B conversion, the I " "argument is converted to hexadecimal notation (using the letters abcdef) in " "the style [-]B<0x>hB<\\&.>hhhhB

    \\(+-d; for B conversion the prefix " "B<0X>, the letters ABCDEF, and the exponent separator B

    is used. There " "is one hexadecimal digit before the decimal point, and the number of digits " "after it is equal to the precision. The default precision suffices for an " "exact representation of the value if an exact representation in base 2 " "exists and otherwise is sufficiently large to distinguish values of type " "I. The digit before the decimal point is unspecified for " "nonnormalized numbers, and nonzero but otherwise unspecified for normalized " "numbers. The exponent always contains at least one digit; if the value is " "zero, the exponent is 0." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If no B modifier is present, the I argument is converted to an " "I, and the resulting character is written. If an B " "modifier is present, the I (wide character) argument is converted to " "a multibyte sequence by a call to the B(3) function, with a " "conversion state starting in the initial state, and the resulting multibyte " "string is written." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If no B modifier is present: the I argument is expected " "to be a pointer to an array of character type (pointer to a string). " "Characters from the array are written up to (but not including) a " "terminating null byte (\\[aq]\\e0\\[aq]); if a precision is specified, no " "more than the number specified are written. If a precision is given, no " "null byte need be present; if the precision is not specified, or is greater " "than the size of the array, the array must contain a terminating null byte." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If an B modifier is present: the I argument is " "expected to be a pointer to an array of wide characters. Wide characters " "from the array are converted to multibyte characters (each by a call to the " "B(3) function, with a conversion state starting in the initial " "state before the first wide character), up to and including a terminating " "null wide character. The resulting multibyte characters are written up to " "(but not including) the terminating null byte. If a precision is specified, " "no more bytes than the number specified are written, but no partial " "multibyte characters are written. Note that the precision determines the " "number of I written, not the number of I or I. The array must contain a terminating null wide character, " "unless a precision is given and it is so small that the number of bytes " "written exceeds it before the end of the array is reached." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for B. " "Don't use." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for B. " "Don't use." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B

    " msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I pointer argument is printed in hexadecimal (as if by B<%#x> " "or B<%#lx>)." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The number of characters written so far is stored into the integer pointed " "to by the corresponding argument. That argument shall be an I, or " "variant whose size matches the (optionally) supplied integer length " "modifier. No argument is converted. (This specifier is not supported by " "the bionic C library.) The behavior is undefined if the conversion " "specification includes any flags, a field width, or a precision." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "(glibc extension; supported by uClibc and musl.) Print output of " "I (or I in the alternate form). No " "argument is required." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<%>" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A \\[aq]%\\[aq] is written. No argument is converted. The complete " "conversion specification is \\[aq]%%\\[aq]." 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-unstable fedora-rawhide opensuse-tumbleweed msgid "" "Upon successful return, these functions return the number of bytes printed " "(excluding the null byte used to end output to strings)." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed msgid "" "The functions B() and B() do not write more than " "I bytes (including the terminating null byte (\\[aq]\\e0\\[aq])). If " "the output was truncated due to this limit, then the return value is the " "number of characters (excluding the terminating null byte) which would have " "been written to the final string if enough space had been available. Thus, " "a return value of I or more means that the output was truncated. (See " "also below under CAVEATS.)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "If an output error is encountered, a negative value is returned." 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(),\n" "B(),\n" "B(),\n" "B(),\n" "B(),\n" "B(),\n" "B(),\n" "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 locale" 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: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "C11, POSIX.1-2008." msgstr "" #. type: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "GNU, 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 "C89, POSIX.1-2001." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "SUSv2, C99, POSIX.1-2001." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Concerning the return value of B(), SUSv2 and C99 contradict each " "other: when B() is called with I=0 then SUSv2 stipulates an " "unspecified return value less than 1, while C99 allows I to be NULL in " "this case, and gives the return value (as always) as the number of " "characters that would have been written in case the output string has been " "large enough. POSIX.1-2001 and later align their specification of " "B() with C99." msgstr "" #. #-#-#-#-# archlinux: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .P #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .P #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .P #. type: Plain text #. #-#-#-#-# debian-bookworm: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .PP #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .PP #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .PP #. type: Plain text #. #-#-#-#-# debian-unstable: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .P #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .P #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .P #. type: Plain text #. #-#-#-#-# fedora-40: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .P #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .P #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .P #. type: Plain text #. #-#-#-#-# fedora-rawhide: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .P #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .P #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .P #. type: Plain text #. #-#-#-#-# mageia-cauldron: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .P #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .P #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .P #. type: Plain text #. #-#-#-#-# opensuse-leap-15-6: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .PP #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .PP #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .PP #. type: Plain text #. #-#-#-#-# opensuse-tumbleweed: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. Linux libc4 knows about the five C standard flags. #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. and the conversions #. \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, #. \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, #. \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, #. where \fBF\fP is a synonym for \fBf\fP. #. Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms #. for \fBld\fP, \fBlo\fP, and \fBlu\fP. #. (This is bad, and caused serious bugs later, when #. support for \fB%D\fP disappeared.) #. No locale-dependent radix character, #. no thousands' separator, no NaN or infinity, no "%m$" and "*m$". #. .P #. Linux libc5 knows about the five C standard flags and the \[aq] flag, #. locale, "%m$" and "*m$". #. It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, #. \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP #. both for \fIlong double\fP and for \fIlong long\fP (this is a bug). #. It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, #. but adds the conversion character #. .BR m , #. which outputs #. .IR strerror(errno) . #. .P #. glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. #. .P #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "glibc 2.1 adds length modifiers B, B, B, and B and conversion " "characters B and B." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "glibc 2.2 adds the conversion character B with C99 semantics, and the " "flag character B." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "glibc 2.35 gives a meaning to the alternate form (B<#>) of the B " "conversion specifier, that is I<%#m>." msgstr "" #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "CAVEATS" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Some programs imprudently rely on code such as 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 "sprintf(buf, \"%s some further text\", buf);\n" msgstr "" #. http://sourceware.org/bugzilla/show_bug.cgi?id=7075 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "to append text to I. However, the standards explicitly note that the " "results are undefined if source and destination buffers overlap when calling " "B(), B(), B(), and B(). Depending " "on the version of B(1) used, and the compiler options employed, calls " "such as the above will B produce the expected results." msgstr "" #. .SH HISTORY #. UNIX V7 defines the three routines #. .BR printf (), #. .BR fprintf (), #. .BR sprintf (), #. and has the flag \-, the width or precision *, the length modifier l, #. and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx. #. This is still true for 2.9.1BSD, but 2.10BSD has the flags #. #, + and and no longer mentions D,O,U,X. #. 2.11BSD has #. .BR vprintf (), #. .BR vfprintf (), #. .BR vsprintf (), #. and warns not to use D,O,U,X. #. 4.3BSD Reno has the flag 0, the length modifiers h and L, #. and the conversions n, p, E, G, X (with current meaning) #. and deprecates D,O,U. #. 4.4BSD introduces the functions #. .BR snprintf () #. and #. .BR vsnprintf (), #. and the length modifier q. #. FreeBSD also has functions #. .BR asprintf () #. and #. .BR vasprintf (), #. that allocate a buffer large enough for #. .BR sprintf (). #. In glibc there are functions #. .BR dprintf () #. and #. .BR vdprintf () #. that print to a file descriptor instead of a stream. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The glibc implementation of the functions B() and B() " "conforms to the C99 standard, that is, behaves as described above, since " "glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was " "truncated." 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 "" #. #-#-#-#-# archlinux: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #. #-#-#-#-# debian-bookworm: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .PP #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #. #-#-#-#-# debian-unstable: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #. #-#-#-#-# fedora-40: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #. #-#-#-#-# fedora-rawhide: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #. #-#-#-#-# mageia-cauldron: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #. #-#-#-#-# opensuse-leap-15-6: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .PP #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #. #-#-#-#-# opensuse-tumbleweed: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Linux libc4.[45] does not have a #. .BR snprintf (), #. but provides a libbsd that contains an #. .BR snprintf () #. equivalent to #. .BR sprintf (), #. that is, one that ignores the #. .I size #. argument. #. Thus, the use of #. .BR snprintf () #. with early libc4 leads to serious security problems. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Because B() and B() assume an arbitrarily long string, " "callers must be careful not to overflow the actual space; this is often " "impossible to assure. Note that the length of the strings produced is " "locale-dependent and difficult to predict. Use B() and " "B() instead (or B(3) and B(3))." msgstr "" #. #-#-#-#-# archlinux: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #. #-#-#-#-# debian-bookworm: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .PP #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #. #-#-#-#-# debian-unstable: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #. #-#-#-#-# fedora-40: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #. #-#-#-#-# fedora-rawhide: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #. #-#-#-#-# mageia-cauldron: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #. #-#-#-#-# opensuse-leap-15-6: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .PP #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #. #-#-#-#-# opensuse-tumbleweed: printf.3.pot (PACKAGE VERSION) #-#-#-#-# #. .P #. Some floating-point conversions under early libc4 #. caused memory leaks. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Code such as BIB<);> often indicates a bug, since I may " "contain a % character. If I comes from untrusted user input, it may " "contain B<%n>, causing the B() call to write to memory and creating " "a security hole." 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 "To print I to five decimal places:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "#include Emath.hE\n" "#include Estdio.hE\n" "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "To print a date and time in the form \"Sunday, July 3, 10:02\", where " "I and I are pointers to strings:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "#include Estdio.hE\n" "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n" " weekday, month, day, hour, min);\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Many countries use the day-month-year order. Hence, an internationalized " "version must be able to print the arguments in an order specified by the " "format:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "#include Estdio.hE\n" "fprintf(stdout, format,\n" " weekday, month, day, hour, min);\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "where I depends on locale, and may permute the arguments. With the " "value:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "To allocate a sufficiently large string and print into it (code correct for " "both glibc 2.0 and glibc 2.1):" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estdarg.hE\n" "\\&\n" "char *\n" "make_message(const char *fmt, ...)\n" "{\n" " int n = 0;\n" " size_t size = 0;\n" " char *p = NULL;\n" " va_list ap;\n" "\\&\n" " /* Determine required size. */\n" "\\&\n" " va_start(ap, fmt);\n" " n = vsnprintf(p, size, fmt, ap);\n" " va_end(ap);\n" "\\&\n" " if (n E 0)\n" " return NULL;\n" "\\&\n" " size = (size_t) n + 1; /* One extra byte for \\[aq]\\e0\\[aq] */\n" " p = malloc(size);\n" " if (p == NULL)\n" " return NULL;\n" "\\&\n" " va_start(ap, fmt);\n" " n = vsnprintf(p, size, fmt, ap);\n" " va_end(ap);\n" "\\&\n" " if (n E 0) {\n" " free(p);\n" " return NULL;\n" " }\n" "\\&\n" " return p;\n" "}\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated " "as an error instead of being handled gracefully." msgstr "" #. 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(1), B(3), B(3), B(3), B(3), " "B(3), B(3), B(3), B(5)" 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: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "C99 and POSIX.1-2001 specify that the results are undefined if a call to " "B(), B(), B(), or B() would cause " "copying to take place between objects that overlap (e.g., if the target " "string array and one of the supplied input arguments refer to the same " "buffer). See NOTES." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "The value should be zero padded. For B, B, B, B, B, B, " "B, B, B, B, B, B, B, and B conversions, the " "converted value is padded on the left with zeros rather than blanks. If the " "B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored. If a " "precision is given with a numeric conversion (B, B, B, B, B, " "and B), the B<\\&0> flag is ignored. For other conversions, the behavior " "is undefined." msgstr "" #. type: Plain text #: debian-bookworm fedora-40 mageia-cauldron opensuse-leap-15-6 msgid "" "Upon successful return, these functions return the number of characters " "printed (excluding the null byte used to end output to strings)." msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 msgid "" "The functions B() and B() do not write more than " "I bytes (including the terminating null byte (\\[aq]\\e0\\[aq])). If " "the output was truncated due to this limit, then the return value is the " "number of characters (excluding the terminating null byte) which would have " "been written to the final string if enough space had been available. Thus, " "a return value of I or more means that the output was truncated. (See " "also below under NOTES.)" msgstr "" #. type: SH #: debian-bookworm #, no-wrap msgid "VERSIONS" msgstr "" #. type: Plain text #: debian-bookworm msgid "" "B(), B(), B(), B(), B(), " "B(), B(), B(): POSIX.1-2001, POSIX.1-2008, " "C99." msgstr "" #. type: Plain text #: debian-bookworm msgid "" "The B() and B() functions were originally GNU " "extensions that were later standardized in POSIX.1-2008." msgstr "" #. type: SH #: debian-bookworm #, no-wrap msgid "NOTES" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estdarg.hE\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "char *\n" "make_message(const char *fmt, ...)\n" "{\n" " int n = 0;\n" " size_t size = 0;\n" " char *p = NULL;\n" " va_list ap;\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid " /* Determine required size. */\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " va_start(ap, fmt);\n" " n = vsnprintf(p, size, fmt, ap);\n" " va_end(ap);\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (n E 0)\n" " return NULL;\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " size = (size_t) n + 1; /* One extra byte for \\[aq]\\e0\\[aq] */\n" " p = malloc(size);\n" " if (p == NULL)\n" " return NULL;\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (n E 0) {\n" " free(p);\n" " return NULL;\n" " }\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " return p;\n" "}\n" msgstr "" #. type: TH #: fedora-40 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 "2024-03-16" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-04-01" 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 ""