]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r219342, r219346:
authortrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 29 Mar 2011 17:52:45 +0000 (17:52 +0000)
committertrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 29 Mar 2011 17:52:45 +0000 (17:52 +0000)
commit567b6531413a8f63934b1940959fd8d89e937904
treebca356f88ce66f7a5e5bdaa249dc46258863533a
parentd48c89b1556db973403afe4ffde46bd32c9f7894
MFC r219342, r219346:

r219342 (pjd):

Fix various issues in how %#T is handled:
- If precision is 0, don't print period followed by no digits.
- If precision is 0 stop printing units as soon as possible
  (eg. if we have three years and five days and precision is 0
   print only 3y5d).
- If precision is not 0, print all units (eg. 3y0d0h0m0s.00).

r219346 (pjd):

Because we call __printf_out() with a on-stack buffer, also call
__printf_flush() so we are sure it won't be referenced after we return.

Approved by: kib (co-mentor), pjd (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@220138 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/stdio/xprintf_time.c