+ fmt_number_style_clone (&new->styles[t], &old->styles[t]);
+
+ return new;
+}
+
+/* Returns the number formatting style associated with the given
+ format TYPE. */
+const struct fmt_number_style *
+fmt_settings_get_style (const struct fmt_settings *settings,
+ enum fmt_type type)
+{
+ assert (is_fmt_type (type));
+ return &settings->styles[type];
+}
+
+/* Sets the number style for TYPE to have the given DECIMAL and GROUPING
+ characters, negative prefix NEG_PREFIX, prefix PREFIX, suffix SUFFIX, and
+ negative suffix NEG_SUFFIX. All of the strings are UTF-8 encoded. */
+void
+fmt_settings_set_style (struct fmt_settings *settings, enum fmt_type type,
+ char decimal, char grouping,
+ const char *neg_prefix, const char *prefix,
+ const char *suffix, const char *neg_suffix)
+{
+ struct fmt_number_style *style = &settings->styles[type];
+ int total_bytes, total_width;
+
+ assert (grouping == '.' || grouping == ',' || grouping == 0);
+ assert (decimal == '.' || decimal == ',');
+ assert (decimal != grouping);