]> diplodocus.org Git - nmh/commit
Rewrite cpnumber() to fix `%2(msg)' with 123 overflowing to `?23'.
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 22 Nov 2017 13:44:01 +0000 (13:44 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 22 Nov 2017 13:55:19 +0000 (13:55 +0000)
commita034d7e5edab2f0d56a62f6e1fcbbc76f3e5f31b
tree952ae7a6d390594f4a0642a1757c93361ebb22aa
parentff168106b44fdfbaed7d7cf08c54a72ee1fe2c0a
Rewrite cpnumber() to fix `%2(msg)' with 123 overflowing to `?23'.

Reported in 1.7 by Ken on nmh-workers yesterday.
`It seems this was introduced in commit 92128dacf'.
We now use the C library to format the number, and then manipulate the
result.  A temporary charstring_t is no longer used.
Also adds left justification using negative width.
man/mh-format.man
sbr/fmt_scan.c