-
-/* Parses the alphabetic prefix of the current token as a format
- specifier name. Returns the corresponding format specifier
- type if successful, or -1 on failure. If ALLOW_XT is zero,
- then X and T format specifiers are not allowed. If CP is
- nonzero, then *CP is set to the first non-alphabetic character
- in the current token on success or to a null pointer on
- failure. */
-int
-parse_format_specifier_name (const char **cp, enum fmt_parse_flags flags)
+/* Parses a token taking the form of a format specifier and
+ returns true only if successful. Emits an error message on
+ failure. Stores a null-terminated string representing the
+ format type in TYPE, and the width and number of decimal
+ places in *WIDTH and *DECIMALS.
+
+ TYPE is not checked as to whether it is really the name of a
+ format. Both width and decimals are considered optional. If
+ missing, *WIDTH or *DECIMALS or both will be set to 0. */
+bool
+parse_abstract_format_specifier__ (struct lexer *lexer,
+ char type[FMT_TYPE_LEN_MAX + 1],
+ uint16_t *width, uint8_t *decimals)