History log of /src/lib/libc/stdio/printf.3
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.71 03-Apr-2022 christos

Improve wording to avoid confusion about the return value of {v,}asprintf(3)


# 1.70 23-Sep-2021 wiz

printf(3): mention snprintb(3)


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.69 16-Feb-2021 riastradh

Correct floating-point terminology.

Might want to harmonize the printf(3) and wprintf(3) descriptions of
`%a'.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.68 31-Dec-2017 dholland

Fix plurals.


Revision tags: perseant-stdc-iso10646-base
# 1.67 03-Jul-2017 wiz

Remove workaround for ancient HTML generation code.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.66 21-Feb-2017 abhinav

Insert comma between two Nm entries.
Replace Nm with Fn to refer a function.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.65 19-Nov-2015 pgoyette

branches: 1.65.2; 1.65.4;
Remove duplicated 'i' from list of numeric formats


# 1.64 29-Sep-2014 christos

Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX
(well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX).


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base tls-maxphys-base
# 1.63 04-May-2013 wiz

branches: 1.63.6;
Grammar.


# 1.62 04-May-2013 christos

_ss improvements


Revision tags: agc-symver-base yamt-pagecache-base8
# 1.61 20-Jan-2013 uwe

Mark up occurence of printf() in text with .Fn


# 1.60 20-Jan-2013 uwe

In newfmt() example one level of indentation is enough.


# 1.59 19-Jan-2013 uwe

Fix typo.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.58 26-Dec-2010 jnemeth

branches: 1.58.6; 1.58.8; 1.58.12;
vsnprintf_ss does NOT handle floating point formats


# 1.57 22-Dec-2010 wiz

Add punctuation.


# 1.56 22-Dec-2010 christos

document vsnprintf_ss


# 1.55 16-Dec-2010 wiz

Observe the following spelling:
- wide character (noun)
- wide-character (adjective)

Inspired by jmc@OpenBSD.


# 1.54 06-Sep-2010 wiz

I assume "POSIX 200805" is IEEE Std 1003.1-2008 (POSIX.1), so use
appropriate .St.


# 1.53 06-Sep-2010 christos

add dprintf and vdprintf


# 1.52 13-May-2010 joerg

Use plain references and don't depend on multiple expansion runs.


# 1.51 13-May-2010 joerg

Mask %U, it is a macro nowadays.


# 1.50 21-Mar-2010 jruoho

Mention the recommended usage of inttypes(3) when applicable.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.49 09-Apr-2009 joerg

No .br after .Sh.


# 1.48 11-Jan-2009 christos

branches: 1.48.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.47 16-Dec-2008 christos

fix return values for snprintf and vsnprintf.


# 1.46 11-Dec-2008 wiz

Sort sections, sort SEE ALSO, remove trailing whitespace.


# 1.45 11-Dec-2008 yamt

move a description of return values into the RETURN VALUES section.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.44 09-Jun-2007 christos

branches: 1.44.20;
bring in many changes from FreeBSD


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
# 1.43 25-Sep-2006 martin

As suggested by Johan Veenhuizen in PR 32981, reword slightly to avoid
the impression return values would always be -1.
Approved by christos.


Revision tags: abandoned-netbsd-4-base
# 1.42 19-Mar-2006 wiz

Mark up NULL and -.


# 1.41 18-Mar-2006 rumble

Note that for asprintf and vasprintf it is more portable to check for
a -1 return, rather than ret being set to NULL on error.

From Otto Moerbeek.


# 1.40 20-Jul-2005 christos

PR/30971: Noriyuki Soda: Fix %ll prints long long, and %q is not portable.


# 1.39 21-Jun-2005 christos

Document that passing NULL to %s prints "(null)".


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.38 08-Sep-2003 wiz

Use St -isoC-9X instead of St -isoC9X, to be in sync with groff.


# 1.37 27-Aug-2003 heas

plural "characters" for ret of {v}snprintf


# 1.36 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.


# 1.35 11-May-2003 wiz

Drop trailing space.


# 1.34 11-May-2003 kleink

Oops, typo in previous.


# 1.33 11-May-2003 kleink

As prompted by Thomas Klausner, add a RETURN VALUES section.


# 1.32 03-May-2003 wiz

Misc. fixes from jmc@openbsd.


# 1.31 16-Apr-2003 wiz

Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.


# 1.30 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.29 03-Jan-2003 mjl

Fix typos (from PR 19650)


Revision tags: fvdl_fs64_base
# 1.28 11-Nov-2002 simonb

Document that the *printf() functions can return a negative value under
output error conditions.


# 1.27 01-Oct-2002 wiz

New sentence, new line. From Robert Elz.


# 1.26 10-Jul-2002 yamt

import CAVEATS sections from OpenBSD.
with little tweak by me.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.25 07-Feb-2002 ross

Generate <>& symbolically.


# 1.24 21-Jan-2002 kleink

One pasto, one typo.


# 1.23 02-Dec-2001 kleink

Fix a mis-pasting in previous; pointed out by Thomas Klausner.


# 1.22 02-Dec-2001 kleink

C99:
* Recognize %F.
* Convert {Infinity,NaN} to {"inf","nan"} for %[efg], and to
{"INF","NAN"} for %[EFG].


# 1.21 17-Oct-2001 kleink

Drop a VAX/Tahoe reference (the VAX case wasn't true with the current compiler
either).


# 1.20 16-Sep-2001 wiz

Mainly sort SEE ALSO, but also sort sections, and some punctuation and
paragraph fixes.


# 1.19 30-Apr-2001 kleink

Clarify C standards situation a bit.


# 1.18 28-Apr-2001 kleink

* Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
intmax_t, pointer-type and size_t arguments.


# 1.17 26-Apr-2001 kleink

Fix an ... interesting pasto in the description of the l length modifier
that's been here forever.


# 1.16 03-Apr-2001 jhawk

Xr printf(9)


# 1.15 29-Dec-2000 kleink

branches: 1.15.2;
Sprinkle some __restrict into stdio.


# 1.14 19-Oct-2000 kleink

C99: Passing a null pointer as the buffer argument to snprintf() and
vsnprintf() is permitted when the size argument is zero as well; mostly
from Peter Seebach in PR standards/9603.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.13 14-Sep-1998 tv

branches: 1.13.10;
Document %ll[diouxX] as requested by <bgrayson@ece.utexas.edu> in PR
standards/3527. Also describe the argument to such a format as "quad_t",
not "quad int".


# 1.12 29-Aug-1998 lukem

first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.


# 1.11 28-Aug-1998 perry

document asprintf and vasprintf


# 1.10 08-Jun-1998 jeremy

Changed HISTORY section to reflect that vsnprintf and snprintf first
appeared in 4.4BSD, rather than ``the current release''.


# 1.9 08-Jun-1998 lukem

Implement a new manual page category ``SECURITY CONSIDERATIONS''
(suggested by mycroft)


# 1.8 28-Apr-1998 fair

fix mdoc references and other mistakes


# 1.7 05-Feb-1998 perry

add LIBRARY section to man page


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.6 08-Mar-1997 mouse

alternate -> alternative, per PR 2643


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.5 02-Feb-1995 jtc

Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.4 16-May-1994 jtc

Fix typo, from Giles Lean (Fixes bug #248)


# 1.3 11-Jan-1994 jtc

Fix spelling errors.


# 1.2 01-Aug-1993 mycroft

Add RCS indentifiers.


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision