summaryrefslogtreecommitdiff
path: root/modules/exitfail
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-12-06 14:48:04 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-12-06 14:51:13 -0800
commit1c740444c9224c81b92c4375babc73efe57e1dc9 (patch)
tree44dfa4035dd0de1bf0c7f6c37c14b5c2d54f4a7a /modules/exitfail
parent0a13f6771d98fd03688a6e202f1e623010e49c6e (diff)
downloadgnulib-1c740444c9224c81b92c4375babc73efe57e1dc9.tar.gz
nstrftime: better width support for %N, %z
* lib/nstrftime.c (width_add, width_add1, width_cpy): New macros, which generalize ‘add’, ‘add1’, ‘cpy’ by adding a new WIDTH parameter. (add, add1, cpy): Use these macros. (width_add): Do not treat digits == 0 as a special case, do not pad if padding is ‘-’, and do not use a negative width. (__strftime_internal): Redo formatting of nanoseconds and numeric timezones to avoid buffer misuse in unusual cases, and so that widths make more sense. Add support for widths greater than 9 to the %N format; they are zero filled on the right. * tests/test-nstrftime.c (posixtm_test): Add a %12N test.
Diffstat (limited to 'modules/exitfail')
0 files changed, 0 insertions, 0 deletions