- out = format_cc (cc->neg_prefix, cc->grouping, cc_string);
- *out++ = cc->grouping;
- out = format_cc (cc->prefix, cc->grouping, out);
- *out++ = cc->grouping;
- out = format_cc (cc->suffix, cc->grouping, out);
- *out++ = cc->grouping;
- out = format_cc (cc->neg_suffix, cc->grouping, out);
- *out = '\0';
+ ds_init_empty (&out);
+ format_cc (&out, cc->neg_prefix, cc->grouping);
+ ds_put_char (&out, cc->grouping);
+ format_cc (&out, cc->prefix, cc->grouping);
+ ds_put_char (&out, cc->grouping);
+ format_cc (&out, cc->suffix, cc->grouping);
+ ds_put_char (&out, cc->grouping);
+ format_cc (&out, cc->neg_suffix, cc->grouping);