replace T_ABS by temp and T_REL_GLOBAL by dtemp in .model cards

This commit is contained in:
Holger Vogt 2018-05-18 15:17:45 +02:00
parent 13ca544d15
commit 9d8148edae
1 changed files with 13 additions and 0 deletions

View File

@ -6443,5 +6443,18 @@ pspice_compat(struct card *oldcard)
}
}
}
/* replace T_ABS by temp and T_REL_GLOBAL by dtemp in .model cards */
for (card = newcard; card; card = card->nextcard) {
char *cut_line = card->line;
if (ciprefix(".model", cut_line)) {
char *t_str;
if((t_str = strstr(cut_line, "t_abs")) != NULL)
memcpy(t_str, " temp", 5);
else if((t_str = strstr(cut_line, "t_rel_global")) != NULL)
memcpy(t_str, " dtemp", 12);
}
}
return newcard;
}