Re: [ng-spice] A small bugfix for rework 11
"Arno W. Peters" wrote:
> 1) asprinf() is available in C libraries on GNU and BSD systems and
> thus standard and documented on those platforms.
OK. I only have access to Linux- and HP-UX Systems (and Windows,
but that does not count). So I didn't know about BSD.
> 2) asprinf() relieves the programmer from calculating the size of the
> memory allocation for printing strings. This is a Good Thing.
Sure.
> 2) configure can check for asprinf() and define a macro
> HAVE_ASPRINTF. In case the function is not available, you are free to
> add the function to the misc directory and enclose the whole function
> with
>
> #ifndef HAVE_ASPRINTF
> int
> asprintf(char **strp, const char *format, ...)
> {
> /* Code copied (for example) from the FreeBSD C library */
> }
> #endif
>
> I will accept patches that implement this function for ngspice and
> integrate it into the archive.
If I find the time to try ng-spice on my HP 9000 I will provide one.
Regards,
Manni
Partial thread listing: