From 9d8148edae639dc3029da73aae71b9b50a81d6eb Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 18 May 2018 15:17:45 +0200 Subject: [PATCH] replace T_ABS by temp and T_REL_GLOBAL by dtemp in .model cards --- src/frontend/inpcom.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 7529c9731..02439c6a0 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -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; }