If an error code was returned while formatting a string, the buffer was doubled in size and the formatting was retried until there was no error. However, if there was a formatting error the previous time, it will persist with a larger buffer causing an infinte loop.
Actually it woulid not be an infinite loop since the memory allocation would eventually fail.
The code for this patch along with several string utilities that were added for use later, such as a substring search using the Rabin-Karp algorithm, are available in branch beta_jdm.
```
commit 595c0249689cf33ce6408b3899f560e72d251a9a
Date: Mon, 9 Dec 2019 00:27:03 -0500
```
Builds of ngspice succeeded in Windows with Visual Studio, MinGW, and Cygwin and in Linux using GCC. In Windows with Cygwin, make check indicated all passes, and in Linux the paranoia test suite passed, except for the same three tests that failed earlier.