-/* Maximum length of prefix or suffix string in
- struct fmt_number_style. */
-#define FMT_STYLE_AFFIX_MAX 16
-
-
-struct fmt_number_style *fmt_number_style_create (void);
-void fmt_number_style_destroy (struct fmt_number_style *);
+/* 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 numeric output style. */
+struct fmt_number_style
+ {
+ struct substring neg_prefix; /* Negative prefix. */
+ struct substring prefix; /* Prefix. */
+ struct substring suffix; /* Suffix. */
+ struct substring neg_suffix; /* Negative suffix. */
+ char decimal; /* Decimal point: '.' or ','. */
+ char grouping; /* Grouping character: ',', '.', or 0. */
+ };