<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/printf/printf.1, branch upstream/11.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2014-04-21T22:47:18Z</updated>
<entry>
<title>Add parameterized position handling to printf(1).</title>
<updated>2014-04-21T22:47:18Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2014-04-21T22:47:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b0620803d5b1d2d184c35fdce6670ce475b0f9da'/>
<id>urn:sha1:b0620803d5b1d2d184c35fdce6670ce475b0f9da</id>
<content type='text'>
Add a new %n$ option to change the order of the parameters as
done in the ksh93 builtin printf (among others).

For example:
%printf '%2$1d %1$s\n' one 2 three 4
2 one
4 three

The feature was written by Garret D'Amore under a
BSD license for Nexenta/illumos.

Reference:
http://garrett.damore.org/2010/10/new-implementation-of-printf.html

PR:		bin/152934
Obtained from:	Illumos
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Remove trailing whitespace per mdoc lint warning</title>
<updated>2012-03-29T05:02:12Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2012-03-29T05:02:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=50d675f7a9fca2f3fba3a23ac41a8ae2c0162e4e'/>
<id>urn:sha1:50d675f7a9fca2f3fba3a23ac41a8ae2c0162e4e</id>
<content type='text'>
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
</content>
</entry>
<entry>
<title>printf(1): Document that %c and precision for %b/%s use bytes, not chars.</title>
<updated>2011-05-28T14:32:47Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-05-28T14:32:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=27a43b2e515bc2f8f34782b8e14e04cd2ec9471c'/>
<id>urn:sha1:27a43b2e515bc2f8f34782b8e14e04cd2ec9471c</id>
<content type='text'>
This means these features do not work as expected with multibyte characters.

This perhaps less than ideal behaviour matches printf(3) and is specified by
POSIX.
</content>
</entry>
<entry>
<title>printf: Allow multibyte characters for '&lt;char&gt; form, avoid negative codes.</title>
<updated>2011-05-28T11:37:47Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-05-28T11:37:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=98102dabd3d1f00bb970634a5722be0f7e93078d'/>
<id>urn:sha1:98102dabd3d1f00bb970634a5722be0f7e93078d</id>
<content type='text'>
Examples:
  LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
  LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.

Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.

Note that there is no general way to go back from the character code to the
character.
</content>
</entry>
<entry>
<title>printf(1): Move non-bugs from the BUGS section to a new section CAVEATS.</title>
<updated>2011-04-25T19:15:58Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-04-25T19:15:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1792d820be90e4cd5e41cea3e0e1fb39680b2d99'/>
<id>urn:sha1:1792d820be90e4cd5e41cea3e0e1fb39680b2d99</id>
<content type='text'>
</content>
</entry>
<entry>
<title>printf(1): Mention effect of '#' modifier on other conversions.</title>
<updated>2011-04-25T12:36:29Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-04-25T12:36:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8a906b236a671afcc18c2e66a6b760674ecef57f'/>
<id>urn:sha1:8a906b236a671afcc18c2e66a6b760674ecef57f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove the advertising clause from UCB copyrighted files in usr.bin.  This</title>
<updated>2010-12-11T08:32:16Z</updated>
<author>
<name>Joel Dahl</name>
<email>joel@FreeBSD.org</email>
</author>
<published>2010-12-11T08:32:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=da52b4caaf187775f6b56a72c6b16e94ad728f7b'/>
<id>urn:sha1:da52b4caaf187775f6b56a72c6b16e94ad728f7b</id>
<content type='text'>
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
</content>
</entry>
<entry>
<title>sh: Add printf builtin.</title>
<updated>2010-11-19T12:56:13Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2010-11-19T12:56:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9897c45f31fe59265a9bd531cac4e6eb8effc04d'/>
<id>urn:sha1:9897c45f31fe59265a9bd531cac4e6eb8effc04d</id>
<content type='text'>
This was removed in 2001 but I think it is appropriate to add it back:
* I do not want to encourage people to write fragile and non-portable echo
  commands by making printf much slower than echo.
* Recent versions of Autoconf use it a lot.
* Almost no software still wants to support systems that do not have
  printf(1) at all.
* In many other shells printf is already a builtin.

Side effect: printf is now always the builtin version (which behaves
identically to /usr/bin/printf) and cannot be overridden via PATH (except
via the undocumented %builtin mechanism).

Code size increases about 5K on i386. Embedded folks might want to replace
/usr/bin/printf with a hard link to /usr/bin/alias.
</content>
</entry>
<entry>
<title>Note bug in trying to printf(1) things like: '-%s\n' "foo"</title>
<updated>2010-09-09T19:27:40Z</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2010-09-09T19:27:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4b2f91532164095cf83202b30824896be0adf41a'/>
<id>urn:sha1:4b2f91532164095cf83202b30824896be0adf41a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>printf(1): Clarify that \OOO produces a byte, different %b escape sequences.</title>
<updated>2010-09-05T21:44:50Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2010-09-05T21:44:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3cf53e8550e625965b82310f07bc6ca93226a901'/>
<id>urn:sha1:3cf53e8550e625965b82310f07bc6ca93226a901</id>
<content type='text'>
Octal escape sequences are expanded to bytes, not characters, and multiple
are required for a multibyte character.

The valid escape sequences in %b strings are slightly different from the
escape sequences in the format string.
</content>
</entry>
</feed>
