On Sun, Oct 25, 2020 at 10:26:43PM +0100, Anders Waldenborg wrote: > static void print_item(FILE *outfile, const struct trailer_item *item) > { > if (item->token) { > const char *tok = item->token; > + const char *sep = (char []){separators[0], ' ', '\0'}; I don't think this syntax is likely to be sufficiently portable, as you're defining a variable length array implicitly. I think: char orig_sep[] = { separators[0], ' ', '\0' }; const char *sep = orig_sep; would work. Though I suspect that just making this: > - c = last_non_space_char(tok); > - if (!c) > - return; > - if (strchr(separators, c)) > - fputs(tok, outfile); > - else > - fprintf(outfile, "%s%c ", tok, separators[0]); > + fprintf(outfile, "%s%s", tok, sep); into: fprintf(outfile, "%s", tok); if (conf && conf->nondefault_separator) fprintf(outfile, "%s", conf->nondefault_separator); else fprintf(outfile, "%c ", separators[0]); might be simpler for a reader to follow, even though it's a little more verbose. -Peff