From 4eeb1361d66e17769a77982d6e9243fc8b4beb9f Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 22 May 2014 19:54:29 +0200 Subject: [PATCH] spicenum.c, rewrite nupa_done() --- src/frontend/numparam/spicenum.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index be6af17c4..b0719f2ea 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -481,38 +481,22 @@ nupa_del_dicoS(void) static void nupa_done(void) { - /* int i; not needed so far, see below */ - SPICE_DSTRING rep; /* dynamic report */ - int dictsize, nerrors; + int nerrors = dicoS->errcount; + int dictsize = donedico(dicoS); - spice_dstring_init(&rep); - - if (logfileS != NULL) { + if (logfileS) { fclose(logfileS); logfileS = NULL; } - nerrors = dicoS->errcount; - dictsize = donedico(dicoS); - /* We cannot remove dicoS here because numparam is used by the .measure statements, which are invoked only after the simulation has finished. */ if (nerrors) { + printf(" Copies=%d Evals=%d Placeholders=%ld Symbols=%d Errors=%d\n", + linecountS, evalcountS, placeholder, dictsize, nerrors); /* debug: ask if spice run really wanted */ - sadd(&rep, " Copies="); - nadd(&rep, linecountS); - sadd(&rep, " Evals="); - nadd(&rep, evalcountS); - sadd(&rep, " Placeholders="); - nadd(&rep, placeholder); - sadd(&rep, " Symbols="); - nadd(&rep, dictsize); - sadd(&rep, " Errors="); - nadd(&rep, nerrors); - cadd(&rep, '\n'); - printf("%s", spice_dstring_value(&rep)); if (ft_batchmode) controlled_exit(EXIT_FAILURE); for (;;) {