> In the attached I added a single extra orig_buffersize variable to
> control an extra read-only scan.
Thanks, it looks good.
The other recursive call to quotearg_buffer_restyled
return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
flags & ~QA_ELIDE_OUTER_QUOTES, NULL,
is also OK, because the code is careful not to make more than one
STORE (...) call per input byte if elide_outer_quotes is true. There are
enough occurrences of
so that the string that was produced before this recursive call will
not be longer than the one produced by the recursive call. => All fine.