nest, cleanup the loop, pronounce the `c', `lcc' pair

This commit is contained in:
rlar 2012-03-11 21:55:42 +01:00
parent 0be258a808
commit f6d1f1fa73
1 changed files with 6 additions and 2 deletions

View File

@ -447,7 +447,10 @@ doit(struct line *deck) {
{
int nest = 1;
lcc = last;
for (c = last->li_next; c; c = c->li_next) {
c = lcc->li_next;
while (c) {
if (ciprefix(sbend, c->li_line)) /* found a .ends */
nest--;
else if (ciprefix(start, c->li_line)) /* found a .subckt */
@ -456,7 +459,8 @@ doit(struct line *deck) {
if(!nest)
break;
lcc = c; /* lcc points to current pos of c */
lcc = c;
c = lcc->li_next;
}
}