Browse Source

numparam/spicenum.c, bug #300, exit gracefully upon numparam error (SHARED_MODULE)

Thanks to Sergii Baitala, who reported this in
  #300 Shared ngspice: ngspice hangs on getchar
  http://sourceforge.net/p/ngspice/bugs/300/
pre-master-46
h_vogt 10 years ago
committed by rlar
parent
commit
f7d387005f
  1. 9
      src/frontend/numparam/spicenum.c

9
src/frontend/numparam/spicenum.c

@ -28,6 +28,9 @@ Todo:
#include "ngspice/fteext.h"
#ifdef SHARED_MODULE
extern void shared_exit(int status);
#endif
extern bool ft_batchmode;
@ -494,6 +497,12 @@ nupa_done(void)
simulation has finished. */
if (nerrors) {
#ifdef SHARED_MODULE
fprintf(cp_err, "Numparam expansion errors: Problem with input file.\n");
shared_exit(EXIT_BAD);
#endif
printf(" Copies=%d Evals=%d Placeholders=%ld Symbols=%d Errors=%d\n",
linecountS, evalcountS, placeholder, dictsize, nerrors);
/* debug: ask if spice run really wanted */

Loading…
Cancel
Save