From 257d2188931e10882d02946200e5aa10cf563f7f Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 22 Aug 2009 16:54:03 +0000 Subject: [PATCH] option noinit, ref. to _logb --- ChangeLog | 6 ++++++ src/frontend/options.c | 6 ++++-- src/frontend/spiceif.c | 5 ++++- src/include/fteext.h | 1 + src/include/ngspice.h | 1 + src/maths/sparse/spsmp.c | 4 +++- src/spicelib/analysis/dctran.c | 2 +- 7 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c68ee7364..eb61fc2b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-17 Holger Vogt + * dctran.c, spiceif.c, options.c, fteext.h: option noinit added. + This option suppresses the printout of "Initial Transient Solution". + noinit may be combined with acct. noacct will suppress both printouts. + * spsmp.c, ngspice.h: reference to _logb added for _MSC_VER + 2009-08-17 Holger Vogt * inp.c: some comments added diff --git a/src/frontend/options.c b/src/frontend/options.c index 99bb8f04a..603546887 100644 --- a/src/frontend/options.c +++ b/src/frontend/options.c @@ -27,7 +27,7 @@ $Id$ static void setdb(char *str); bool ft_acctprint = FALSE, ft_noacctprint = FALSE, ft_listprint = FALSE; -bool ft_nodesprint = FALSE, ft_optsprint = FALSE; +bool ft_nodesprint = FALSE, ft_optsprint = FALSE, ft_noinitprint = FALSE; /* The user-supplied routine to query the values of variables. This * recognises the $&varname notation, and also searches the values of @@ -248,7 +248,9 @@ cp_usrset(struct variable *var, bool isset) } else if (eq(var->va_name, "acct")) { ft_acctprint = isset; } else if (eq(var->va_name, "noacct")) { - ft_noacctprint = isset; + ft_noacctprint = isset; + } else if (eq(var->va_name, "noinit")) { + ft_noinitprint = isset; } else if (eq(var->va_name, "list")) { ft_listprint = isset; } else if (eq(var->va_name, "nopage")) { diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index 188875a8d..2495331d1 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -395,7 +395,10 @@ if_option(void *ckt, char *name, int type, char *value) return 0; } else if (eq(name, "noacct")) { ft_noacctprint = TRUE; - return 0; + return 0; + } else if (eq(name, "noinit")) { + ft_noinitprint = TRUE; + return 0; } else if (eq(name, "list")) { ft_listprint = TRUE; return 0; diff --git a/src/include/fteext.h b/src/include/fteext.h index f640b2cc0..62710ce37 100644 --- a/src/include/fteext.h +++ b/src/include/fteext.h @@ -181,6 +181,7 @@ extern void com_xgraph(); extern bool ft_acctprint; extern bool ft_noacctprint; +extern bool ft_noinitprint; extern bool ft_listprint; extern bool ft_nopage; extern bool ft_nomod; diff --git a/src/include/ngspice.h b/src/include/ngspice.h index 6e874468e..83fb2b033 100644 --- a/src/include/ngspice.h +++ b/src/include/ngspice.h @@ -168,6 +168,7 @@ struct timeb timebegin; #define dup2 _dup2 #define open _open #define write _write +#define strcasecmp _stricmp #endif #ifndef HAVE_RANDOM diff --git a/src/maths/sparse/spsmp.c b/src/maths/sparse/spsmp.c index 94ae155d9..c6c3cf8cb 100644 --- a/src/maths/sparse/spsmp.c +++ b/src/maths/sparse/spsmp.c @@ -104,6 +104,8 @@ #if defined (_MSC_VER) extern double scalbn(double, int); +#define logb _logb +extern double logb(double); #endif static void LoadGmin(SMPmatrix *eMatrix, double Gmin); @@ -358,7 +360,7 @@ SMPcDProd(SMPmatrix *Matrix, SPcomplex *pMantissa, int *pExponent) if (y < z) y = z; - *pExponent = x + y; + *pExponent = (int)(x + y); x = scalbn(re, (int) -y); z = scalbn(im, (int) -y); #ifdef debug_print diff --git a/src/spicelib/analysis/dctran.c b/src/spicelib/analysis/dctran.c index 0d4740701..894597b80 100644 --- a/src/spicelib/analysis/dctran.c +++ b/src/spicelib/analysis/dctran.c @@ -215,7 +215,7 @@ DCtran(CKTcircuit *ckt, } */ fprintf(stdout,"\n"); fflush(stdout); - } else if (!ft_noacctprint) { + } else if (!ft_noacctprint && !ft_noinitprint) { fprintf(stdout,"\nInitial Transient Solution\n"); fprintf(stdout,"--------------------------\n\n"); fprintf(stdout,"%-30s %15s\n", "Node", "Voltage");