uniqstr: avoid need for VLAs
commit973c456f63a93071fb370c06ee5668ae4a7376b7
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 28 Sep 2018 23:05:51 +0000 (28 16:05 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 28 Sep 2018 23:41:41 +0000 (28 16:41 -0700)
tree453106690b40ecf18bde11eba3969c4ab6cfc8d0
parent2d079403257dee8a90be0a2bed03cde0063c7209
uniqstr: avoid need for VLAs

C11 no longer requires support for variable-length arrays, and
VS2015 does not have them.  Redo UNIQSTR_CONCAT to use a method
that is simpler and better anyway.
* src/uniqstr.c (uniqstr_vsprintf): Remove; no longer needed.
* src/uniqstr.h (UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_):
* src/uniqstr.c (uniqstr_concat): New function.
* src/uniqstr.h (UNIQSTR_CONCAT): Use it instead of using
uniqstr_vsprintf.
src/uniqstr.c
src/uniqstr.h