From 536bf69a243fcbd6813bc00472887c0f4a59561d Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 11 Mar 2012 21:42:54 +0100 Subject: [PATCH] submod, drop renamed subname artifacts, EXACT --- src/frontend/subckt.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index 404b80f32..46297fa77 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -404,7 +404,7 @@ doit(struct line *deck) { /* Save all the old stuff... */ struct subs *subs = NULL; - wordlist *submod0 = NULL; + wordlist *submod = NULL; #ifdef TRACE /* SDB debug statement */ @@ -437,8 +437,8 @@ doit(struct line *deck) { fprintf(cp_err, "Error: no %s line.\n", sbend); return (NULL); } - wl_free(submod0); - submod0 = NULL; + wl_free(submod); + submod = NULL; /* Here we loop through the deck looking for .subckt and .ends cards. * At the end of this section, last will point to the location of the @@ -613,8 +613,8 @@ doit(struct line *deck) { lcc = inp_deckcopy(sss->su_def); /* Change the names of .models found in .subckts . . . */ - if (modtranslate(lcc, scname, &submod0)) /* this translates the model name in the .model line */ - devmodtranslate(lcc, scname, submod0); /* This translates the model name on all components in the deck */ + if (modtranslate(lcc, scname, &submod)) /* this translates the model name in the .model line */ + devmodtranslate(lcc, scname, submod); /* This translates the model name on all components in the deck */ { char *s = sss->su_args; @@ -1659,7 +1659,7 @@ numdevs(char *s) * otherwise. *----------------------------------------------------------------------*/ static bool -modtranslate(struct line *deck, char *subname, wordlist **submod1) +modtranslate(struct line *deck, char *subname, wordlist **submod) { struct line *c; char *buffer, *name, *t, model[4 * BSIZE_SP]; @@ -1684,11 +1684,11 @@ modtranslate(struct line *deck, char *subname, wordlist **submod1) tfree(name); name = gettok(&t); /* name now holds model name */ wlsub = alloc(struct wordlist); - wlsub->wl_next = *submod1; - if (*submod1) - (*submod1)->wl_prev = wlsub; + wlsub->wl_next = *submod; + if (*submod) + (*submod)->wl_prev = wlsub; /* here's where we insert the model name into the model name list */ - *submod1 = wlsub; + *submod = wlsub; wlsub->wl_word = name; #ifdef TRACE /* SDB debug statement */