From 98fe623ba417b937d4f147f0414d8de1cd1b565c Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 16 May 2018 00:14:31 +0200 Subject: [PATCH] add function prototype pspice_compat to deal with compatibility issues during loading a PSPICE library --- src/frontend/inpcom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 60eacf28d..e2127838e 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -146,6 +146,7 @@ static char *inp_pathresolve(const char *name); static char *inp_pathresolve_at(char *name, char *dir); static char *search_plain_identifier(char *str, const char *identifier); void tprint(struct card *deck); +static struct card *pspice_compat(struct card *newcard); struct inp_read_t { struct card *cc; @@ -852,6 +853,8 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile) } if (newcard) { + if (inp_compat_mode == COMPATMODE_PS) + newcard = pspice_compat(newcard); int line_number_inc = 1; end->nextcard = newcard; /* Renumber the lines */ @@ -6302,3 +6305,12 @@ inp_meas_current(struct card *deck) new_rep = repn; } } + + +static struct card * +pspice_compat(struct card *oldcard) +{ + struct card *card, *newcard, *nextcard; + newcard = oldcard; + return newcard; +}