subckt.c, finishLine(), #5/6 move code up into if() body

This commit is contained in:
rlar 2016-11-19 10:44:24 +01:00
parent e54cc664da
commit 30e515cc4d
1 changed files with 16 additions and 18 deletions

View File

@ -1375,27 +1375,10 @@ finishLine(struct bxx_buffer *t, char *src, char *scname)
bxx_putc(t, '.');
bxx_put_substring(t, buf, buf_end);
}
} else {
/*
i(vname) -> i(v.subckt.vname)
i(ename) -> i(e.subckt.ename)
i(hname) -> i(h.subckt.hname)
i(bname) -> i(b.subckt.hname)
*/
if (buf[0] == 'v' || buf[0] == 'V' || buf[0] == 'e' || buf[0] == 'h'
|| buf[0] == 'b' || buf[0] == 'B') {
bxx_putc(t, buf[0]);
bxx_putc(t, '.');
}
bxx_put_cstring(t, scname);
bxx_putc(t, '.');
bxx_put_substring(t, buf, buf_end);
}
/* translate the reference node, as in the "2" in "v(4,2)" */
/* translate the reference node, as in the "2" in "v(4,2)" */
if ((which == 'v') || (which == 'V')) {
while (*src && (isspace_c(*src) || *src == ',')) {
src++;
}
@ -1412,6 +1395,21 @@ finishLine(struct bxx_buffer *t, char *src, char *scname)
bxx_put_substring(t, buf, buf_end);
}
}
} else {
/*
i(vname) -> i(v.subckt.vname)
i(ename) -> i(e.subckt.ename)
i(hname) -> i(h.subckt.hname)
i(bname) -> i(b.subckt.hname)
*/
if (buf[0] == 'v' || buf[0] == 'V' || buf[0] == 'e' || buf[0] == 'h'
|| buf[0] == 'b' || buf[0] == 'B') {
bxx_putc(t, buf[0]);
bxx_putc(t, '.');
}
bxx_put_cstring(t, scname);
bxx_putc(t, '.');
bxx_put_substring(t, buf, buf_end);
}
}
}