-/* Maximum length of prefix or suffix string in
- struct fmt_number_style. */
-#define FMT_STYLE_AFFIX_MAX 16
-
+/* Format settings.
+
+ A fmt_settings is really just a collection of one "struct fmt_number_style"
+ for each format type. */
+struct fmt_settings *fmt_settings_create (void);
+void fmt_settings_destroy (struct fmt_settings *);
+struct fmt_settings *fmt_settings_clone (const struct fmt_settings *);
+
+void fmt_settings_set_decimal (struct fmt_settings *, char);
+
+const struct fmt_number_style *fmt_settings_get_style (
+ const struct fmt_settings *, enum fmt_type);
+void fmt_settings_set_style (struct fmt_settings *, enum fmt_type,
+ char decimal, char grouping,
+ const char *neg_prefix, const char *prefix,
+ const char *suffix, const char *neg_suffix);
+\f
+/* 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()). */
+ };