<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib/strfmon.c, branch release/11.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libc: spelling fixes.</title>
<updated>2016-04-30T01:24:24+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-04-30T01:24:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=32223c1b7dea9bcf5ccb35a6462fb6a29a344910'/>
<id>32223c1b7dea9bcf5ccb35a6462fb6a29a344910</id>
<content type='text'>
Mostly on comments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly on comments.
</pre>
</div>
</content>
</entry>
<entry>
<title>strfmon: reduce unnecessary snprintf.</title>
<updated>2014-07-12T15:19:30+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2014-07-12T15:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0c029579787bd2fbb892c8bd254b57df5a28a3f5'/>
<id>0c029579787bd2fbb892c8bd254b57df5a28a3f5</id>
<content type='text'>
No need for the snprintf/asprintf dance; use fixed width formats.

Obtained from:	NetBSD (CVS rev. 1.8)
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No need for the snprintf/asprintf dance; use fixed width formats.

Obtained from:	NetBSD (CVS rev. 1.8)
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement xlocale APIs from Darwin, mainly for use by libc++.  This adds a</title>
<updated>2011-11-20T14:45:42+00:00</updated>
<author>
<name>David Chisnall</name>
<email>theraven@FreeBSD.org</email>
</author>
<published>2011-11-20T14:45:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3c87aa1d3dc1d8dad3efad322852a8e1e76dee55'/>
<id>3c87aa1d3dc1d8dad3efad322852a8e1e76dee55</id>
<content type='text'>
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix PR</title>
<updated>2010-02-10T00:02:09+00:00</updated>
<author>
<name>Martin Cracauer</name>
<email>cracauer@FreeBSD.org</email>
</author>
<published>2010-02-10T00:02:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3a921aa75da792ea26accc85f58b2266511861df'/>
<id>3a921aa75da792ea26accc85f58b2266511861df</id>
<content type='text'>
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/143350
Empty string test gone wrong.

Testing this requires that you have a locale that has the sign string
unset but has int_n_sign_posn set (the default locale falls through to
use "()" around negative numbers which is probably another bug).

I created that setup by hand and indeed without this fix negative
numbers are put out as positive numbers (doesn't fall through to use
"-" as default indicator).

Unfixed example in nl_NL.ISO8859-1 with lc-&gt;negative_sign set to empty
string:
  strfmon(buf, sizeof(buf), "%-8i", -42.0);
==&gt;
example2: 'EUR  42,00' 'Eu 42,00'

Fixed:
example2: 'EUR  42,00-' 'Eu 42,00-'

This file and suggested fix are identical in at least freebsd-8.
Backport might be appropriate but some expert on locales should
probably have a look at us defaulting to negative numbers in
parenthesis when LC_* is default.  That doesn't look right and is not
what other OSes are doing.

PR:		143350
Submitted by:	Corinna Vinschen
Reviewed by:	bug reporter submitted, tested by me
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/143350
Empty string test gone wrong.

Testing this requires that you have a locale that has the sign string
unset but has int_n_sign_posn set (the default locale falls through to
use "()" around negative numbers which is probably another bug).

I created that setup by hand and indeed without this fix negative
numbers are put out as positive numbers (doesn't fall through to use
"-" as default indicator).

Unfixed example in nl_NL.ISO8859-1 with lc-&gt;negative_sign set to empty
string:
  strfmon(buf, sizeof(buf), "%-8i", -42.0);
==&gt;
example2: 'EUR  42,00' 'Eu 42,00'

Fixed:
example2: 'EUR  42,00-' 'Eu 42,00-'

This file and suggested fix are identical in at least freebsd-8.
Backport might be appropriate but some expert on locales should
probably have a look at us defaulting to negative numbers in
parenthesis when LC_* is default.  That doesn't look right and is not
what other OSes are doing.

PR:		143350
Submitted by:	Corinna Vinschen
Reviewed by:	bug reporter submitted, tested by me
</pre>
</div>
</content>
</entry>
<entry>
<title>Stricter check for integer overflow.</title>
<updated>2008-04-24T07:49:00+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2008-04-24T07:49:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=eff93c8073fac6bbea85067fd1bd804982770c76'/>
<id>eff93c8073fac6bbea85067fd1bd804982770c76</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't forget to free() currency_symbol and asciivalue when multiple</title>
<updated>2008-04-19T07:22:58+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2008-04-19T07:22:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5b30d6ca7796d82bf6bd40c559f29c86b07ba572'/>
<id>5b30d6ca7796d82bf6bd40c559f29c86b07ba572</id>
<content type='text'>
conversion specifiers for them are present.

Submitted by:	Maxim Dounin &lt;mdounin@mdounin.ru&gt;
Obtained from:	NetBSD (partially)
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
conversion specifiers for them are present.

Submitted by:	Maxim Dounin &lt;mdounin@mdounin.ru&gt;
Obtained from:	NetBSD (partially)
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Better strfmon(3) conversion specifiers sanity checking.</title>
<updated>2008-04-19T07:18:22+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2008-04-19T07:18:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3890416f9c76b1736442d49b1f46e603eebee87b'/>
<id>3890416f9c76b1736442d49b1f46e603eebee87b</id>
<content type='text'>
There were no checks for left and right precisions at all, and
a check for field width had integer overflow bug.

Reported by:	Maksymilian Arciemowicz
Security:	http://securityreason.com/achievement_securityalert/53
Submitted by:	Maxim Dounin &lt;mdounin@mdounin.ru&gt;
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were no checks for left and right precisions at all, and
a check for field width had integer overflow bug.

Reported by:	Maksymilian Arciemowicz
Security:	http://securityreason.com/achievement_securityalert/53
Submitted by:	Maxim Dounin &lt;mdounin@mdounin.ru&gt;
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Use calloc() instaed of zeroing memory ourselves.</title>
<updated>2008-04-13T08:05:08+00:00</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2008-04-13T08:05:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=92226c92f3ab73e2e3d3aec141486c3cafbbcfcd'/>
<id>92226c92f3ab73e2e3d3aec141486c3cafbbcfcd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Include a couple of headers to ensure consistency between the prototype and</title>
<updated>2005-09-12T19:52:42+00:00</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2005-09-12T19:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=613100918de03164200eb28f7db1a2b1d701a697'/>
<id>613100918de03164200eb28f7db1a2b1d701a697</id>
<content type='text'>
the function definition.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the function definition.
</pre>
</div>
</content>
</entry>
<entry>
<title>According to C99 decimal_point can't be empty</title>
<updated>2003-03-20T08:18:55+00:00</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2003-03-20T08:18:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=85bebbc156e23d6029e0824d782260830025a611'/>
<id>85bebbc156e23d6029e0824d782260830025a611</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
