mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 15:39:11 +00:00
c-format: Accept null precision.
* gettext-tools/src/format-c-parse.h: Fix comment regarding the precision and the ISO C23 size specifiers. * gettext-tools/tests/format-c-1: Add a test case with null precision.
This commit is contained in:
parent
b470e7eb26
commit
688d443b26
@ -28,10 +28,10 @@
|
||||
- is optionally followed by a width specification: '*' (reads an argument)
|
||||
or '*m$' or a nonempty digit sequence,
|
||||
- is optionally followed by '.' and a precision specification: '*' (reads
|
||||
an argument) or '*m$' or a nonempty digit sequence,
|
||||
an argument) or '*m$' or an optional nonempty digit sequence,
|
||||
- is either continued like this:
|
||||
- is optionally followed by a size specifier, one of 'hh' 'h' 'l' 'll'
|
||||
'L' 'q' 'j' 'z' 't',
|
||||
'L' 'q' 'j' 'z' 't' 'w8' 'w16' 'w32' 'w64' 'wf8' 'wf16' 'wf32' 'wf64',
|
||||
- is finished by a specifier
|
||||
- '%', that needs no argument,
|
||||
- 'c', 'C', that need a character argument,
|
||||
|
||||
@ -178,6 +178,8 @@ cat <<\EOF > f-c-1.data
|
||||
"abc%y"
|
||||
# Invalid: flags after width
|
||||
"abc%*0g"
|
||||
# Valid: null precision
|
||||
"abc%.f"
|
||||
# Invalid: twice precision
|
||||
"abc%.4.2g"
|
||||
# Valid: three arguments
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user