Re: [ng-spice] A small bugfix for rework 11


To ng-spice@ieee.ing.uniroma1.it
From Manfred Metzger <ManfredMetzger@gmx.de>
Date Tue, 30 May 2000 22:15:48 +0200
Delivered-To mailing list ng-spice@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-help@ieee.ing.uniroma1.it; run by ezmlm
References <3932BC9F.FCF8FC81@gmx.de > <20000529221030.A2253@cgmd80028.chello.nl > <3933FFC1.A0D8CE66@gmx.de > <20000530214935.A20509@cgmd80028.chello.nl >
Reply-To ng-spice@ieee.ing.uniroma1.it
Sender root

"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: