Descriptionfmt: detect implied zero-precision field width
Printf formatting in the C library tradition allows an isolated period to specify
a zero precision, so that "%5.0f" and "%5.f" have the same meaning. Also, the any
width but no fractional digits "%.0f" and "%.f" are equivalent. It looks funny but
seems to be universally supported. I've changed the approprate code in print.c so
that once the period is seen the precision flag is set and the width is zero unless
further digits are provided.
Patch Set 1 #Patch Set 2 : diff -r d847323c0fbf https://go.googlecode.com/hg/ #Patch Set 3 : diff -r aa01a846e2b2 https://go.googlecode.com/hg/ #MessagesTotal messages: 3
|