spicenum.c, rewrite nupa_done()

This commit is contained in:
rlar 2014-05-22 19:54:29 +02:00
parent d2d606a79a
commit 4eeb1361d6
1 changed files with 5 additions and 21 deletions

View File

@ -481,38 +481,22 @@ nupa_del_dicoS(void)
static void static void
nupa_done(void) nupa_done(void)
{ {
/* int i; not needed so far, see below */ int nerrors = dicoS->errcount;
SPICE_DSTRING rep; /* dynamic report */ int dictsize = donedico(dicoS);
int dictsize, nerrors;
spice_dstring_init(&rep); if (logfileS) {
if (logfileS != NULL) {
fclose(logfileS); fclose(logfileS);
logfileS = NULL; logfileS = NULL;
} }
nerrors = dicoS->errcount;
dictsize = donedico(dicoS);
/* We cannot remove dicoS here because numparam is used by /* We cannot remove dicoS here because numparam is used by
the .measure statements, which are invoked only after the the .measure statements, which are invoked only after the
simulation has finished. */ simulation has finished. */
if (nerrors) { 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 */ /* 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) if (ft_batchmode)
controlled_exit(EXIT_FAILURE); controlled_exit(EXIT_FAILURE);
for (;;) { for (;;) {