diff --git a/src/frontend/cpitf.c b/src/frontend/cpitf.c index 018c95cc0..23e371971 100644 --- a/src/frontend/cpitf.c +++ b/src/frontend/cpitf.c @@ -160,6 +160,7 @@ ft_cpinit(void) cp_vset("prompt", VT_STRING, buf); cp_vset("noglob", VT_BOOL, (char *) &t); + cp_vset("brief", VT_BOOL, (char *) &t); /* Now do a bunch of things that used to be in the spiceinit file * but were too slow to read in... diff --git a/src/frontend/inp.c b/src/frontend/inp.c index f60e4f085..170d8b0ce 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -15,7 +15,6 @@ $Id$ * the listing routines. */ -#include #include #include "ngspice.h" #include "cpdefs.h" @@ -48,23 +47,6 @@ static char * upper(register char *string); static bool doedit(char *filename); static void line_free_x(struct line * deck, bool recurse); -// Initial AlmostEqualULPs version - fast and simple, but -// some limitations. -static bool AlmostEqualUlps(float A, float B, int maxUlps) -{ - assert(sizeof(float) == sizeof(int)); - - if (A == B) - return TRUE; - - int intDiff = abs(*(int*)&A - *(int*)&B); - - if (intDiff <= maxUlps) - return TRUE; - - return FALSE; -} - /* Do a listing. Use is listing [expanded] [logical] [physical] [deck] */ void com_listing(wordlist *wl) @@ -657,7 +639,7 @@ inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse, struct variable *eev = NULL; wordlist *wl; bool noparse, ii; - double brief = 0, i; + bool brief; /* First throw away any old error messages there might be and fix * the case of the lines. */ @@ -710,9 +692,6 @@ inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse, eev->va_type, (char *) &eev->va_num); break; case VT_REAL: - if ( strcmp("brief",eev->va_name)==0 ){ - cp_vset("brief", VT_REAL, (char*) &eev->va_real ); - } if_option(ct->ci_ckt, eev->va_name, eev->va_type, (char *) &eev->va_real); break; @@ -776,11 +755,9 @@ inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse, } /* for (dd = deck; dd; dd = dd->li_next) */ - if ( cp_getvar( "brief", VT_REAL, (char *) &i ) ) { - brief = i; - } - // only print out netlist if brief == 0 - if(AlmostEqualUlps(brief,0,3)) { + /* Only print out netlist if brief is FALSE */ + cp_getvar( "brief", VT_BOOL, (bool *) &brief ); + if(brief==FALSE) { /* output deck */ out_printf( "\nProcessed Netlist\n" ); out_printf( "=================\n" ); diff --git a/src/frontend/miscvars.c b/src/frontend/miscvars.c index 0a53959ab..0c57f4010 100644 --- a/src/frontend/miscvars.c +++ b/src/frontend/miscvars.c @@ -28,6 +28,7 @@ char *ft_setkwords[] = { "addcontrol", "altshow", "appendwrite", + "brief", "bypass", "chgtol", "color", diff --git a/src/spinit.in b/src/spinit.in index d2784f4d8..1bb14c445 100644 --- a/src/spinit.in +++ b/src/spinit.in @@ -3,6 +3,8 @@ alias exit quit alias acct rusage all set x11lineararcs +*unset brief + strcmp __flag $program "ngspice" if $__flag = 0