Browse Source

enable PSPICE compatible ~(~v(9)&v(8))

pre-master-46
Holger Vogt 6 years ago
parent
commit
0c74820821
  1. 14
      src/frontend/inpcom.c

14
src/frontend/inpcom.c

@ -7518,7 +7518,7 @@ static struct card *pspice_compat(struct card *oldcard)
}
}
/* replace & with && and | with || and *# with * # */
/* replace & with && , | with || , *# with * # , and ~ with ! */
for (card = newcard; card; card = card->nextcard) {
char *t;
char *cut_line = card->line;
@ -7581,6 +7581,18 @@ static struct card *pspice_compat(struct card *oldcard)
t = strstr(tt, "|");
}
}
/* We may have '~' in path names or A devices */
char *firsttok = nexttok(card->line); /* skip over whitespaces */
if (ciprefix(".inc", firsttok) || ciprefix(".lib", firsttok) ||
ciprefix("A", firsttok))
continue;
if ((t = strstr(card->line, "~")) != NULL) {
while (t) {
*t = '!';
t = strstr(t, "~");
}
}
}
/* replace T_ABS by temp, T_REL_GLOBAL by dtemp, and T_MEASURED by TNOM

Loading…
Cancel
Save