summary refs log tree commit diff
path: root/src/nodetypes
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2014-09-26 22:16:26 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2014-09-26 22:27:20 +0800
commit012222e38cd0b48a3dabd10c9a3cf6b2c4c5befc (patch)
tree11d7a8dc02d9c01c19367f68416d7e1efa5e96f2 /src/nodetypes
parent[JOBS] Fix off-by-one error for multiple of four job numbers (diff)
downloaddash-012222e38cd0b48a3dabd10c9a3cf6b2c4c5befc.tar.gz
dash-012222e38cd0b48a3dabd10c9a3cf6b2c4c5befc.zip
[MAN] Change characters for printf precision to bytes
On Sun, Mar 09, 2014 at 11:11:43AM +0000, Jeroen van Dijke wrote:
> 
> There seems to be a bug in the dash man page, at least in 0.5.7. It reads:
> 
>             Precision:
>                     An optional period, `.', followed by an optional digit string giving a precision which specifies the number of digits to appear after the decimal point, for e and f formats, or the maximum number of *characters* to be printed from a string (b and s for-
>                     mats); if the digit string is missing, the precision is treated as zero;
> 
> dash behaves cuts to the number of bytes
> 
> $ length=10; printf "%.${length}s\n" "eeeeeeeeeeeeeeeeeeeeeeeee"
> eeeeeeeeee
> $ length=10; printf "%.${length}s\n" "ëëëëëëëëëëëëëëëëëëëëëëëëë”
> ëëëëë
> 
> 
> The  POSIX specification (2008) says:
> 
> precision Gives the minimum number of digits to appear for the d, o, i, u, x, or X conversion specifiers (the field is padded with leading zeros), the number of digits to appear after the radix character for the e and f conversion specifiers, the maximum number of significant digits for the g conversion specifier; or the maximum number of *bytes* to be written from a string in the s conversion specifier. The precision shall take the form of a ( '.' ) followed by a decimal digit string; a null digit string is treated as zero.
> 
> So it seems to me that “characters” should be changed to “bytes”.

Indeed and this patch makes that change.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/nodetypes')
0 files changed, 0 insertions, 0 deletions
&follow=1'>makefile: bump versionJason A. Donenfeld 2014-01-17mailmap: source before lighttpdJason A. Donenfeld 2014-01-17ui-shared: do not allow negative minutesJason A. Donenfeld 2014-01-17auth: document tweakables in lua scriptJason A. Donenfeld 2014-01-17repolist: make owner clickable to searchJason A. Donenfeld 2014-01-17ui-shared: move about tab all the way to the leftJason A. Donenfeld 2014-01-17filter: don't forget to reap the auth filterJason A. Donenfeld 2014-01-17cgit.c: free tmp variableJason A. Donenfeld 2014-01-17Switch to exclusively using global ctxLukas Fleischer 2014-01-16auth: have cgit calculate login addressJason A. Donenfeld 2014-01-16auth: lua string comparisons are time invariantJason A. Donenfeld 2014-01-16authentication: use hidden form instead of refererJason A. Donenfeld 2014-01-16auth: add basic authentication filter frameworkJason A. Donenfeld 2014-01-16t0111: Additions and fixesLukas Fleischer 2014-01-16parsing.c: Remove leading space from committerLukas Fleischer