+/* A prefix or suffix for a numeric output format. */
+struct fmt_affix
+ {
+ char *s; /* String contents of affix, in UTF-8. */
+ int width; /* Display width in columns (see wcwidth()). */
+ };
+
+/* A numeric output style. This can express the basic numeric formats (in the
+ FMT_CAT_BASIC category) and custom currency formats (FMT_CCx). */
+struct fmt_number_style
+ {
+ struct fmt_affix neg_prefix; /* Negative prefix. */
+ struct fmt_affix prefix; /* Prefix. */
+ struct fmt_affix suffix; /* Suffix. */
+ struct fmt_affix neg_suffix; /* Negative suffix. */
+ char decimal; /* Decimal point: '.' or ','. */
+ char grouping; /* Grouping character: ',', '.', or 0. */
+
+ /* A fmt_affix may require more bytes than its display width; for example,
+ U+00A5 (¥) is 2 bytes in UTF-8 but occupies only one display column.
+ This member is the sum of the number of bytes required by all of the
+ fmt_affix members in this struct, minus their display widths. Thus, it
+ can be used to size memory allocations: for example, the formatted
+ result of CCA20.5 requires no more than (20 + extra_bytes) bytes in
+ UTF-8. */
+ int extra_bytes;
+ };
+
+struct fmt_number_style *fmt_number_style_from_string (const char *);
+struct fmt_number_style *fmt_number_style_clone (
+ const struct fmt_number_style *);
+void fmt_number_style_destroy (struct fmt_number_style *);
+
+char *fmt_number_style_to_string (const struct fmt_number_style *);