- char *neg_prefix, *prefix, *suffix, *neg_suffix;
- char decimal, grouping;
-
- assert (fmt_get_category (type) == FMT_CAT_CUSTOM);
-
- /* Determine separators. */
- if (!find_cc_separators (cc_string, &decimal, &grouping))
- {
- msg (SE, _("%s: Custom currency string `%s' does not contain "
- "exactly three periods or commas (or it contains both)."),
- fmt_name (type), cc_string);
- return false;
- }
-
- cc_string = extract_cc_token (cc_string, grouping, &neg_prefix);
- cc_string = extract_cc_token (cc_string, grouping, &prefix);
- cc_string = extract_cc_token (cc_string, grouping, &suffix);
- cc_string = extract_cc_token (cc_string, grouping, &neg_suffix);
-
- fmt_settings_set_style (the_settings.styles, type, decimal, grouping,
- neg_prefix, prefix, suffix, neg_suffix);
-
- free (neg_suffix);
- free (suffix);
- free (prefix);
- free (neg_prefix);
-
- return true;