consider all PSPICE containing compatibility settings

for the evaluation of the pwr function
or allowing '-' in a subcircuit name
This commit is contained in:
Holger Vogt 2018-10-20 23:47:29 +02:00
parent f31f044e30
commit 75d1e45737
2 changed files with 5 additions and 2 deletions

View File

@ -186,7 +186,8 @@ findsubname(dico_t *dico, SPICE_DSTRINGPTR dstr_p)
char *t;
entry_t *entry;
/* check for known subckt name */
if (inp_compat_mode == COMPATMODE_PS)
if (inp_compat_mode == COMPATMODE_PS || inp_compat_mode == COMPATMODE_PSA
|| inp_compat_mode == COMPATMODE_LTPS || inp_compat_mode == COMPATMODE_LTPSA)
for (t = p; alfanumps(*t); t++)
;
else

View File

@ -77,7 +77,9 @@ double
PTpwr(double arg1, double arg2)
{
/* if PSPICE device is evaluated */
if (arg1 == 0.0 && arg2 < 0.0 && inp_compat_mode == COMPATMODE_PS)
if (arg1 == 0.0 && arg2 < 0.0 &&
(inp_compat_mode == COMPATMODE_PS || inp_compat_mode == COMPATMODE_PSA
|| inp_compat_mode == COMPATMODE_LTPS || inp_compat_mode == COMPATMODE_LTPSA))
arg1 += PTfudge_factor;
if (arg1 < 0.0)