<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/printf/printf.c, branch upstream/10.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2014-04-30T20:39:08Z</updated>
<entry>
<title>MFC	r264581, r264744:</title>
<updated>2014-04-30T20:39:08Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2014-04-30T20:39:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=914fc70ec76e09060d62713a7d3c29e83d2d1c41'/>
<id>urn:sha1:914fc70ec76e09060d62713a7d3c29e83d2d1c41</id>
<content type='text'>
Various style(9) fixes and typos in printf, grep, sort and patch.

#define should be followed by a tab.
</content>
</entry>
<entry>
<title>POSIX requires that non-existent or null arguments be treated as if a</title>
<updated>2012-12-18T21:02:38Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2012-12-18T21:02:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2f01c791e9c708e5039eb19974d55748ea3cf394'/>
<id>urn:sha1:2f01c791e9c708e5039eb19974d55748ea3cf394</id>
<content type='text'>
zero argument were supplied.

Add a regression test to catch this case as well.

PR:		bin/174521
Submitted by:	Daniel Shahaf &lt;danielsh@elego.de&gt; (pr)
Submitted by:	Mark Johnston &lt;markjdb@gmail.com&gt; (initial patch)
Reviewed by:	jilles
Approved by:	cperciva (implicit)
MFC after:	3 weeks
</content>
</entry>
<entry>
<title>sh: Prefer internal nextopt() to libc getopt().</title>
<updated>2012-09-15T21:56:30Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2012-09-15T21:56:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7cbda73825918d63360a7d815ff59341d1800d1a'/>
<id>urn:sha1:7cbda73825918d63360a7d815ff59341d1800d1a</id>
<content type='text'>
This reduces code duplication and code size.

/usr/bin/printf is not affected.

Side effect: different error messages when certain builtins are passed
invalid options.
</content>
</entry>
<entry>
<title>Style cleanups for printf.</title>
<updated>2012-01-12T20:30:20Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2012-01-12T20:30:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ab71f27172b60f770bf40e62f366cc4778715b28'/>
<id>urn:sha1:ab71f27172b60f770bf40e62f366cc4778715b28</id>
<content type='text'>
PR:		bin/152934
Approved by:	jhb (mentor)
Obtained from:	Illumos
MFC after:	2 weeks
</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: Note that this is used both as a normal program and a shell builtin.</title>
<updated>2011-03-01T21:47:06Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-03-01T21:47:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=77fae5c16dfa60346072a73b2346f38037d05d3b'/>
<id>urn:sha1:77fae5c16dfa60346072a73b2346f38037d05d3b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>printf: Do not use sh memory functions in sh builtin.</title>
<updated>2010-12-29T21:38:00Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2010-12-29T21:38:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=add265c6ba450d4930722a277cd0bc8ac5b42b25'/>
<id>urn:sha1:add265c6ba450d4930722a277cd0bc8ac5b42b25</id>
<content type='text'>
These functions throw exceptions if they fail, possibly causing memory
leaks. The normal out-of-memory handling suffices. The INTOFF around almost
all of printf prevents memory leaks due to SIGINT.
</content>
</entry>
<entry>
<title>sh: Make warnings in the printf builtin non-fatal, like in the program.</title>
<updated>2010-12-20T23:06:57Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2010-12-20T23:06:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6a6760db7f0ba4588af5cb587f482a49d65d1536'/>
<id>urn:sha1:6a6760db7f0ba4588af5cb587f482a49d65d1536</id>
<content type='text'>
The #define for warnx now behaves much like the libc function (except that
it uses sh command name and output).

Also, it now uses C99 __VA_ARGS__ so there is no need for three different
macros for 0, 1 or 2 parameters.
</content>
</entry>
<entry>
<title>Revert r216423 per request from Jilles.</title>
<updated>2010-12-14T20:35:08Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2010-12-14T20:35:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=de46de4dd1362165e9bf9c0d2a50cca7f45044b4'/>
<id>urn:sha1:de46de4dd1362165e9bf9c0d2a50cca7f45044b4</id>
<content type='text'>
The new behavior prevents us from being able to bail out explicitly
on unknown options that we have not implemented.  BASH for instance
have introduced a '-v' for printf(1) builtin and it seems to be bad
to pretend that we supported it and have a script break silently.
</content>
</entry>
<entry>
<title>When printf is being used as a sh(1) builtin, it can not call</title>
<updated>2010-12-14T18:23:15Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2010-12-14T18:23:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5eccc0009b39ee0ef76e13e6606fa5ea4e11a3a9'/>
<id>urn:sha1:5eccc0009b39ee0ef76e13e6606fa5ea4e11a3a9</id>
<content type='text'>
exit(3) as pointed out by jilles@ so revert to using return(),
also change the return value back to 1 as requested by bde@.

This is logically a revert of revision 216422.
</content>
</entry>
</feed>
