summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/printf.3
AgeCommit message (Collapse)Author
2024-11-14libc: indicate existing functions that are POSIX 2024Ed Maste
Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47581
2023-11-26lib: Remove ancient SCCS tags.Warner Losh
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
2023-09-07libc: Implement N2680.Dag-Erling Smørgrav
This adds specific width length modifiers in the form of wN and wfN (where N is 8, 16, 32, or 64) which allow printing intN_t and int_fastN_t without resorting to casts or PRI macros. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41725
2023-08-28libc: Document support for binary integers.Dag-Erling Smørgrav
Reviewed by: debdrup, emaste Differential Revision: https://reviews.freebsd.org/D41522
2023-08-16Remove $FreeBSD$: one-line nroff patternWarner Losh
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2018-05-22Implement printf(3) family %m format string extension.Konstantin Belousov
Reviewed by: ed, dim (code only) Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=334031
2018-04-17Don't put multiple names on a single .Nm line. This fixes apropos(1)Edward Tomasz Napierala
output, from this: strnlen, strlen, strlen,(3) - find length of string │······· ... to this: strlen, strnlen(3) - find length of string PR: 223525 MFC after: 2 weeks Notes: svn path=/head/; revision=332642
2017-02-28Renumber copyright clause 4Warner Losh
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
2016-07-30Remove _WITH_GETLINE and _WITH_DPRINTF guardsBaptiste Daroussin
When adding getline(3) and dprintf(3) into libc, those guards were added to prevent breaking too many ports. 7 years later the ports tree have been fixed, it is time to remove this FreeBSDism While here remove the extra parenthesis surrounding dprintf(3) Notes: svn path=/head/; revision=303524
2014-06-23use .Mt to mark up email addresses consistently (part4)Baptiste Daroussin
PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267774
2012-11-08Clarify that the ' flag is an apostrophe.Greg Lehey
MFC after: 2 weeks Notes: svn path=/head/; revision=242738
2012-04-21- Fix the claim that the output is always null-terminated. This isn'tDavid Schultz
true if the size is zero. - Fix a claim that sprintf() is the same as snprintf() with an infinite size. It's equivalent to snprintf() with a size of INT_MAX + 1. - Document the return values in the return values section. - Document the possible errno value of EOVERFLOW. MFC after: 2 weeks Notes: svn path=/head/; revision=234530
2010-09-11Revert changes of 'assure' to 'ensure' made in r211936.Rebecca Cran
Approved by: rrs (mentor) Notes: svn path=/head/; revision=212463
2010-08-28Fix incorrect usage of 'assure' and 'insure'.Rebecca Cran
Approved by: rrs (mentor) Notes: svn path=/head/; revision=211936
2010-05-13mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to theUlrich Spörlein
bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. Found by: mdocml lint run Reviewed by: ru Notes: svn path=/head/; revision=208027
2010-05-11mdoc: use macro for +- that is understood by mdocmlUlrich Spörlein
Reviewed by: brueffer Notes: svn path=/head/; revision=207940
2010-04-05I feel this wording of the history is more clear.David E. O'Brien
ANSIfy vasprintf() while I'm here. Notes: svn path=/head/; revision=206217
2010-02-16%U was macroized in mdoc(7), escape.Ruslan Ermilov
Notes: svn path=/head/; revision=203958
2009-12-02Fix the dprintf() prototype.Christian Brueffer
PR: 141087 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> MFC after: 3 days Notes: svn path=/head/; revision=200019
2009-03-04Add dprintf() and vdprintf() from POSIX.1-2008. Like getline(),David Schultz
dprintf() is a simple wrapper around another function, so we may as well implement it. But also like getline(), we can't prototype it by default right now because it would break too many ports. Notes: svn path=/head/; revision=189356
2009-01-28Update the manpage to reflect r145172.David Schultz
Notes: svn path=/head/; revision=187809
2008-04-12Updates for changes in the way printf() handles hex floating pointDavid Schultz
numbers. Notes: svn path=/head/; revision=178141
2007-01-09Per Regents of the University of Calfornia letter, remove advertisingWarner Losh
clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
2005-09-05Remove references to nonexistent "FreeBSD Security Architecture" document.Tim J. Robbins
Notes: svn path=/head/; revision=149792
2004-10-16Document that the length modifier l is ignored for floating pointStefan Farfeleder
conversion specifiers (a, A, e, E, f, F, g and G). Notes: svn path=/head/; revision=136592
2004-06-30Markup, grammar, and spelling fixes.Ruslan Ermilov
Notes: svn path=/head/; revision=131365
2004-01-19Bring the *printf(3) documentation up to date with the code:David Schultz
- Update and improve the documentation for %[aA] o Like %[eE], %[aA] may round the result if a precision is specified. o Grammar police: Fix a split infinitive. o The FreeBSD implementation does better than the minimum required by C99 (literal translation of the mantissa). The digit before the hexadecimal-point is never 0 unless the number itself is 0. o Clarify that the exponent field represents a decimal exponent of 2. o Discuss the fact that multiple valid representations are possible. o Remove the entry in the BUGS section claiming that %[aA] is not implemented. - Remove the entry in the BUGS section claiming that the ' flag for printing thousands separators is unimplemented for floating-point. - Remove the entry in the BUGS section claiming that the L modifier reduces the precision to "double" before conversion. Notes: svn path=/head/; revision=124710
2003-01-06Note that the printf(3) and scanf(3) family of functions don't deal withTim J. Robbins
multibyte characters in the format string correctly. Notes: svn path=/head/; revision=108775
2002-12-20Document the fact that the printf() family of functions return negativeTim J. Robbins
values (EOF in our case) on error, and some of the possible errno values in an Errors section. PR: 39257 Notes: svn path=/head/; revision=108121
2002-12-18mdoc(7) police: "The .Fn function".Ruslan Ermilov
Notes: svn path=/head/; revision=108037
2002-12-04Consistently mark std(in|out|err) with .Dv, because that's how theyRuslan Ermilov
are marked up in stdio(3), and because they are defined expressions of type "FILE *". Approved by: re Notes: svn path=/head/; revision=107619
2002-10-20Cross-reference fmtcheck(3).Tim J. Robbins
Notes: svn path=/head/; revision=105498
2002-10-19Indent code example with one tab, not two, for consistency with the rest.Tim J. Robbins
Notes: svn path=/head/; revision=105448
2002-09-24Add cross-references between wide character and single-byte characterTim J. Robbins
versions of printf() and scanf(). Notes: svn path=/head/; revision=103891
2002-09-19Implement the %ls and %lc conversions for printing wide character stringsTim J. Robbins
and wide characters. These were already documented in the manual page, with an entry mentioning that they were not implemented yet. The XSI %S and %C synoyms have not been added. Notes: svn path=/head/; revision=103633
2002-09-06Style: One space between "restrict" qualifier and "*".Tim J. Robbins
Notes: svn path=/head/; revision=103012
2002-08-15 - For compliance with IEEE Std 1003.1-2001, add the 'restrict'Robert Drehmel
qualifier to function prototypes and definitions where appropriate using the '__restrict' macro. - Update the manual page. Notes: svn path=/head/; revision=101914
2002-08-15 - Introduce the 'restrict' qualifier to function prototypes andRobert Drehmel
definitions to comply with IEEE Std 1003.1-2001. - Update the manual pages. Notes: svn path=/head/; revision=101913
2002-08-11Fix typos; each file has at least one s/seperat/separat/Jens Schweikhardt
(I skipped those in contrib/, gnu/ and crypto/) While I was at it, fixed a lot more found by ispell that I could identify with certainty to be errors. All of these were in comments or text, not in actual code. Suggested by: bde MFC after: 3 days Notes: svn path=/head/; revision=101677
2002-08-09mdoc(7) police: punctuation.Ruslan Ermilov
Notes: svn path=/head/; revision=101578
2002-07-15Don't claim to fully implement C99 in the STANDARDS section and then disclaimGarrett Wollman
compliance in the BUGS section immediately below. Notes: svn path=/head/; revision=100136
2002-06-18Fix style and wording bugs introduced in my last commit.Chris Costello
Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=98392
2002-06-15o Move more information from BUGS into SECURITY CONSIDERATIONS andChris Costello
condense the redundant bits. o Provide an example for using snprintf over sprintf. This may be supplemented with an asprintf() example soon. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=98241
2002-06-13Include information on the dangers of passing a user-supplied string asChris Costello
a format string. This will later on be changed to a reference to the FreeBSD Security Architecture after it has been committed. PR: docs/39320 Sposnored by: DARPA, NAI Labs Notes: svn path=/head/; revision=98194
2002-01-09mdoc(7) police:Ruslan Ermilov
Stop abusing the .%J macro for where the .Pa macro should have been used. Notes: svn path=/head/; revision=89138
2002-01-06Add new "SECURITY CONSIDERATIONS" sections.Chris Costello
Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=88971
2001-12-12mdoc(7) police: Minor formatting nits and optimizations to rev. 1.34.Ruslan Ermilov
Notes: svn path=/head/; revision=87735
2001-12-07Remove blank line.Bill Fenner
Notes: svn path=/head/; revision=87478
2001-11-30Implement several of the c99 updates to printf(3):Bill Fenner
- New length modifiers: hh, j, t, z. - New flag: '. Note that %'f is not yet implemented. - Use "inf"/"nan" for efg formats, "INF"/"NAN" for EFG formats. - Implemented %q in terms of %ll; if "quad_t" is not "long long" %q will break. Still to do: - %C, %S, %lc, %ls (wide character support) - %'f (thousands in integer portion of %f) - %a/%A (exact hex representation of floating-point numbers) Garrett Wollman wrote the first version of the vfprintf.c update; Mike Barcroft wrote the first version of the printf.3 changes. Notes: svn path=/head/; revision=87113
2001-10-01mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov
Notes: svn path=/head/; revision=84306