summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/printf.3 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* For the snprintf range check demo, add a (size_t) cast in the right placederaadt2021-04-011-3/+3
| | | | which will satisfy the toughest compiler options
* Spell out n as en for consistency with other parts of the page.tb2020-09-131-3/+3
|
* %lln is percent ell ell n (not dee).claudio2020-09-131-4/+4
| | | | OK deraadt@
* adjust %n description to vaguely say "pointer", becuase the followingderaadt2020-07-101-4/+6
| | | | | | list of "[size]n" includes "n" on it's own, thereby the "int" case is described correctly. ok schwarze
* As suggested by deraadt@, rewrite most of the printf(3) manual pageschwarze2020-07-101-453/+586
| | | | | | | | | | | | | | to properly show the (differing) syntaxes of all the conversion specifications, and reduce the amount of forward references from the list of modifiers to the list of specifiers. While here, properly explain %lc and %ls. Also correct RETURN VALUES, which incorrectly talked about counting characters while actually bytes are counted. Using feedback from millert@, deraadt@, tb@, and Martin Vahlensieck. OK deraadt@, millert@, and tb@ on intermediate versions of this diff and no objections from jmc@.
* Minor tweaks in the description of %g:schwarze2020-07-061-4/+8
| | | | | | | | 1. Clarify that %G uses %F, not %f; noticed by millert@. 2. Mention that %g originally meant "general notation", see: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/stdio/doprnt.s Triggered by a somewhat different patch from Ian <ropers at gmail dot com>. Feedback and OK millert@ and jmc@.
* mop up stdarg rename; ok deraadtjmc2019-08-301-3/+3
|
* Specify that {v,}asprintf(3) returns precisely -1 on failure,schwarze2019-06-281-7/+11
| | | | | | | | | and that the ret pointer is either unchanged or set to NULL in this case. Since these two functions are not standardized by POSIX, documenting the actual behaviour is the way to go, and the above matches all non-buggy implementations we are aware of. OK millert@ deraadt@
* Simplify the description of [v]snprintf(3), move the descriptionschwarze2019-06-271-19/+18
| | | | | | of the return values to RETURN VALUES, deprecate [v]sprintf(3) and fix a punctuation typo. Joint work with and OK millert@.
* an -> a;jmc2019-06-261-2/+2
|
* The POSIX-compatible way of checking for {v,}{f,s,sn,d}printf(3)deraadt2019-06-261-4/+5
| | | | | failure is with < 0, not the more specific -1 from C discussed at length with millert, nicm, schwarze
* For all functions known to be infected by LC_NUMERIC, add shortschwarze2019-01-161-2/+11
| | | | | | | | CAVEATS pointing to the new CAVEATS section in setlocale(3). Make those in wprintf(3) and wscanf(3) more concise since duplicate information is a bad idea. Incompleteness of information originally pointed out by millert@. OK millert@
* some grammar fixes; from dholland@netbsd, -r1.68jmc2018-01-021-6/+6
|
* Consistently .Xr the corresponding wide char functions from char- andschwarze2017-12-011-3/+4
| | | | | string-handling <stdio.h> functions, like we already do it for <string.h>. Includes a smaller patch from <kshe59 at zoho dot eu>, OK jmc@.
* Add dprintf() and vdprintf() RETURN VALUES. OK deraadt@millert2017-06-121-2/+4
|
* Add ERRORS section, from FreeBSD. OK tedu@millert2016-06-061-2/+17
|
* Sync printf family return value with ISO C which specifies thatmillert2015-10-131-3/+3
| | | | | these functions return a negative value on failure. OK doug@ deraadt@
* snprintf(3) is available on all modern systems and asprintf(3) ismillert2015-06-031-6/+4
| | | | available on more systems these days. OK deraadt@
* Reduce usage of predefined strings in manpages.bentley2015-02-281-4/+4
| | | | | | | | | | | Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
* remove .Tn from stdio manuals; Kaspars Bankovskis found one of theseschwarze2015-01-131-10/+6
|
* Reduce instances of `` '' in manuals.bentley2014-11-151-3/+4
| | | | | | | | | | | | troff displays these as typographic quotes, but nroff implementations almost always print them literally, which rarely has the intended effect with modern fonts, even in stock xterm. These uses of `` '' can be replaced either with more semantic alternatives or with Dq, which prints typographic quotes in a UTF-8 locale (but will automatically fall back to `` '' in an ASCII locale). improvements and ok schwarze@
* for non-valid combinations with `#', instead of trying to list them all,jmc2014-05-131-12/+3
| | | | | | simply say all other combinations are behaviour undefined; ok guenther, who reminded me to change these too;
* when demonstrating the correct "double-check" idiom, provide aderaadt2014-05-091-3/+3
| | | | reminder that the return value is int...
* add closing parenthesis.sobrado2014-04-221-3/+3
| | | | ok millert@
* need to escape %U, since it is used in Re/Rs blocks;jmc2014-04-191-2/+2
|
* Demonstrate correct usage of snprintf (regarding overflow detection)deraadt2014-04-191-3/+5
| | | | ok guenther
* more library historyschwarze2013-07-171-2/+19
| | | | | facts checked by sobrado@ style tweaks and ok jmc@
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-051-5/+5
|
* When there are multiple groups of functions with their own #includesguenther2013-04-011-2/+3
| | | | | | | | listed, the #includes in each group are independent, so that users don't need to guess at possible carry-over. general idea ok otto@ millert@ actual diff ok jmc@ schwarze@
* Update STANDARDS section as appropriate for C99.brad2013-03-041-4/+6
| | | | ok guenther@
* Add support for POSIX.1-2008 functions dprintf(3) and vdprintf(3).brad2013-01-301-3/+26
| | | | | Feedback from millert@ guenther@ OK guenther@ man page bits OK jmc@
* make -column lists pretty again;jmc2011-09-031-5/+5
| | | | | | | | | | specifically, rewrite them to permit some markup in the column headers, and use "Ta" instead of literal tabs; mandoc does not currently match groff 100%, but a mandoc fix may be some time off, and we've gone enough releases with poorly formatting column lists. in some cases i have rewritten the lists as -tag, where -column made little sense.
* dispense with some wacky escape sequences;jmc2010-03-261-4/+4
|
* - describe how printf(1) and printf(3) %e, %E, %g, %G, %a, %A behavemartynas2008-09-151-2/+38
| | | | | when the argument is infinity/not-a-number ok millert@, jmc@
* describe %a/%A. from freebsdmartynas2008-09-141-2/+58
| | | | tweaks/ok millert@, jmc@
* - add Fmartynas2008-08-261-3/+16
| | | | | | - make inf INF nan NAN comply to standards (eEfFgG) - extend man page bits ok millert@. w/ a man page tweak and ok jmc@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* clarify return values, prompted by moritz; ok moritz jmcderaadt2007-04-011-4/+8
|
* Use long long and intmax_t instead of quad_t throughout. Adapted inmillert2006-01-131-122/+61
| | | | part from FreeBSD.
* improve the RETURN VALUES section;jmc2006-01-071-8/+12
| | | | | | | for such a small diff, this one was hard work... based on a diff from ray lai; blood, sweat, and tears (and ok) kettenis
* support %jd from c99, although intmax_t may not be available.tedu2005-09-231-1/+16
| | | | ok deraadt espie kettenis
* - typos, punctuation, spacing, macro, layout, etc. fixesjaredy2005-07-261-7/+10
| | | | | | - avoid first person ok jmc
* remove note about long double not being supported by vax.jaredy2005-07-261-5/+2
| | | | | | this should have been in CAVEATS anyway. ok millert, jmc
* move return values to a seperate section, and split them out so that itderaadt2005-04-141-37/+49
| | | | is more clear which variants return which values; ok jmc otto
* Explain what happens when len equals 0 for snprintf().otto2005-04-141-1/+9
| | | | ok jmc@ millert@
* Be correct in our man pages when talking about NUL termination (that is,cloder2005-02-251-2/+2
| | | | | termination with '\0') vs. null termination. Input from krw@, jaredy@, jmc@. OK deraadt@
* Add 'z' and 't' modifiers for printing size_t and ptrdiff_t.otto2004-09-181-1/+42
| | | | ok millert@ deraadt@
* Sort headers in examplegrange2003-08-171-2/+2
| | | | ok millert@
* .Ql Cm -> .Sq Cm where literal makes no sense;jmc2003-07-151-2/+2
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.