Mercurial > hg > octave-lyh > gnulib-hg
changeset 9672:c0fb9d4d860d
Fix bug introduced on 2007-06-10.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 06 Feb 2008 23:58:36 +0100 |
parents | d1f036d390bb |
children | d95fe39a37f7 |
files | ChangeLog lib/vasnprintf.c |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-02-06 Bruno Haible <bruno@clisp.org> + + Fix bug introduced on 2007-06-10. + * lib/vasnprintf.c (VASNPRINTF): Perform zero-padding also if + !NEED_PRINTF_FLAG_ZERO. + 2008-02-05 Peter O'Gorman <pogma@thewrittenword.com> getloadavg: use libperfstat on AIX5
--- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -4535,15 +4535,14 @@ # endif DCHAR_T *p = rp + count; DCHAR_T *end = p + pad; -# if NEED_PRINTF_FLAG_ZERO DCHAR_T *pad_ptr; -# if !DCHAR_IS_TCHAR +# if !DCHAR_IS_TCHAR if (dp->conversion == 'c' || dp->conversion == 's') /* No zero-padding for string directives. */ pad_ptr = NULL; else -# endif +# endif { pad_ptr = (*rp == '-' ? rp + 1 : rp); /* No zero-padding of "inf" and "nan". */ @@ -4551,7 +4550,6 @@ || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) pad_ptr = NULL; } -# endif /* The generated string now extends from rp to p, with the zero padding insertion point being at pad_ptr. */ @@ -4564,7 +4562,6 @@ for (; pad > 0; pad--) *p++ = ' '; } -# if NEED_PRINTF_FLAG_ZERO else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ @@ -4575,7 +4572,6 @@ for (; pad > 0; pad--) *p++ = '0'; } -# endif else { /* Pad with spaces on the left. */