diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 71a3bdeaf..4c4f97999 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1485,6 +1485,7 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name tmpcomp.eg = newcompat.eg; /* EAGLE */ tmpcomp.mc = newcompat.mc; /* to be set for 'make check' */ tmpcomp.xs = newcompat.xs; /* XSPICE */ + tmpcomp.de = newcompat.de; /* degradation */ /* save the new comptmode */ newcompat.isset = TRUE; /* at least one mode is set */ if (ciprefix(".incpslt", buffer)) { @@ -1505,6 +1506,7 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name newcompat.eg = FALSE; newcompat.mc = FALSE; newcompat.xs = FALSE; + newcompat.de = FALSE; } inp_stripcomments_line(buffer, FALSE, TRUE); @@ -1648,6 +1650,7 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name newcompat.eg = tmpcomp.eg; /* EAGLE */ newcompat.mc = tmpcomp.mc; /* to be set for 'make check' */ newcompat.xs = tmpcomp.xs; /* XSPICE */ + newcompat.de = tmpcomp.de; /* degradation */ } } /* end of .include handling */ diff --git a/src/frontend/inpcompat.c b/src/frontend/inpcompat.c index d1c22f5a2..38c2de705 100644 --- a/src/frontend/inpcompat.c +++ b/src/frontend/inpcompat.c @@ -78,6 +78,8 @@ void set_compat_mode(void) newcompat.isset = newcompat.ps = TRUE; /*PSPICE*/ if (strstr(behaviour, "xs")) newcompat.isset = newcompat.xs = TRUE; /*XSPICE*/ + if (strstr(behaviour, "de")) + newcompat.isset = newcompat.de = TRUE; /*degradation*/ if (strstr(behaviour, "lt")) newcompat.isset = newcompat.lt = TRUE; /*LTSPICE*/ if (strstr(behaviour, "ki")) @@ -106,7 +108,7 @@ void set_compat_mode(void) /* reset everything for 'make check' */ if (newcompat.mc) newcompat.eg = newcompat.hs = newcompat.spe = newcompat.ps = newcompat.xs = - newcompat.ll = newcompat.lt = newcompat.ki = newcompat.a = FALSE; + newcompat.ll = newcompat.lt = newcompat.ki = newcompat.a = newcompat.de = FALSE; } /* Print the compatibility flags */ @@ -136,6 +138,8 @@ void print_compat_mode(void) { fprintf(stdout, " spe"); if (newcompat.a) fprintf(stdout, " a"); + if (newcompat.de) + fprintf(stdout, " de"); fprintf(stdout, "\n\n"); } else { diff --git a/src/include/ngspice/compatmode.h b/src/include/ngspice/compatmode.h index 1355a74ed..702069c60 100644 --- a/src/include/ngspice/compatmode.h +++ b/src/include/ngspice/compatmode.h @@ -17,6 +17,7 @@ struct compat bool eg; /* EAGLE */ bool mc; /* to be set for 'make check' */ bool xs; /* XSPICE */ + bool de; /* degradation sim */ }; extern struct compat newcompat;