Browse Source

spicenum.c, new variable `interactive'

when set enables interactive numparam error handling
pre-master-46
h_vogt 10 years ago
committed by rlar
parent
commit
888bcce829
  1. 1
      src/frontend/miscvars.c
  2. 13
      src/frontend/numparam/spicenum.c
  3. 1
      src/spinit.in

1
src/frontend/miscvars.c

@ -65,6 +65,7 @@ char *ft_setkwords[] = {
"height",
"history",
"ignoreeof",
"interactive",
"itl1",
"itl2",
"itl3",

13
src/frontend/numparam/spicenum.c

@ -497,17 +497,18 @@ 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
bool is_interactive = FALSE;
if (cp_getvar("interactive", CP_BOOL, NULL))
is_interactive = TRUE;
printf(" Copies=%d Evals=%d Placeholders=%ld Symbols=%d Errors=%d\n",
linecountS, evalcountS, placeholder, dictsize, nerrors);
/* debug: ask if spice run really wanted */
if (ft_batchmode)
controlled_exit(EXIT_FAILURE);
if (!is_interactive) {
fprintf(cp_err, "Numparam expansion errors: Problem with input file.\n");
controlled_exit(EXIT_FAILURE);
}
for (;;) {
int c;
printf("Numparam expansion errors: Run Spice anyway? y/n ?\n");

1
src/spinit.in

@ -12,6 +12,7 @@ set noaskquit
** set the number of threads in openmp
** default (if compiled with --enable-openmp) is: 2
*set num_threads=4
set interactive
strcmp __flag $program "ngspice"
if $__flag = 0

Loading…
Cancel
Save