subckt.c, finishLine(), #5/9, move/duplicate code behind if/else into the if/else
This commit is contained in:
parent
735e7700ce
commit
ff4805c023
|
|
@ -1323,10 +1323,6 @@ finishLine(struct bxx_buffer *t, char *src, char *scname)
|
||||||
|
|
||||||
if ((which == 'v') || (which == 'V')) {
|
if ((which == 'v') || (which == 'V')) {
|
||||||
s = gettrans(buf, buf_end);
|
s = gettrans(buf, buf_end);
|
||||||
} else {
|
|
||||||
s = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (s) {
|
if (s) {
|
||||||
bxx_put_cstring(t, s);
|
bxx_put_cstring(t, s);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1346,6 +1342,28 @@ finishLine(struct bxx_buffer *t, char *src, char *scname)
|
||||||
bxx_putc(t, '.');
|
bxx_putc(t, '.');
|
||||||
bxx_put_substring(t, buf, buf_end);
|
bxx_put_substring(t, buf, buf_end);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
s = NULL;
|
||||||
|
if (s) {
|
||||||
|
bxx_put_cstring(t, s);
|
||||||
|
} 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 ((which == 'i' || which == 'I') &&
|
||||||
|
(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)" */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue