subckt.c, cleanup
This commit is contained in:
parent
9b01dbae95
commit
2142cfdcce
|
|
@ -209,15 +209,15 @@ inp_subcktexpand(struct line *deck) {
|
||||||
wordlist *modnames = NULL;
|
wordlist *modnames = NULL;
|
||||||
|
|
||||||
if (!cp_getvar("substart", CP_STRING, start))
|
if (!cp_getvar("substart", CP_STRING, start))
|
||||||
(void) strcpy(start, ".subckt");
|
strcpy(start, ".subckt");
|
||||||
if (!cp_getvar("subend", CP_STRING, sbend))
|
if (!cp_getvar("subend", CP_STRING, sbend))
|
||||||
(void) strcpy(sbend, ".ends");
|
strcpy(sbend, ".ends");
|
||||||
if (!cp_getvar("subinvoke", CP_STRING, invoke))
|
if (!cp_getvar("subinvoke", CP_STRING, invoke))
|
||||||
(void) strcpy(invoke, "x");
|
strcpy(invoke, "x");
|
||||||
if (!cp_getvar("modelcard", CP_STRING, model))
|
if (!cp_getvar("modelcard", CP_STRING, model))
|
||||||
(void) strcpy(model, ".model");
|
strcpy(model, ".model");
|
||||||
if (!cp_getvar("modelline", CP_STRING, model))
|
if (!cp_getvar("modelline", CP_STRING, model))
|
||||||
(void) strcpy(model, ".model");
|
strcpy(model, ".model");
|
||||||
|
|
||||||
use_numparams = cp_getvar("numparams", CP_BOOL, NULL);
|
use_numparams = cp_getvar("numparams", CP_BOOL, NULL);
|
||||||
|
|
||||||
|
|
@ -267,10 +267,9 @@ inp_subcktexpand(struct line *deck) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ciprefix(model, c->li_line)) {
|
if (ciprefix(model, c->li_line)) {
|
||||||
char *s = c->li_line;
|
char *s = nexttok(c->li_line);
|
||||||
s = nexttok(s); /* discard the model keyword */
|
|
||||||
modnames = wl_cons(gettok(&s), modnames);
|
modnames = wl_cons(gettok(&s), modnames);
|
||||||
} /* model name finding routine */
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1258,9 +1257,9 @@ finishLine(struct bxx_buffer *t, char *src, char *scname)
|
||||||
translate_node_name(t, scname, buf, buf_end);
|
translate_node_name(t, scname, 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)" */
|
||||||
while (*src && (isspace_c(*src) || *src == ',')) {
|
while (*src && (isspace_c(*src) || *src == ','))
|
||||||
src++;
|
src++;
|
||||||
}
|
|
||||||
if (*src && *src != ')') {
|
if (*src && *src != ')') {
|
||||||
for (buf = src; *src && !isspace_c(*src) && (*src != ')'); )
|
for (buf = src; *src && !isspace_c(*src) && (*src != ')'); )
|
||||||
src++;
|
src++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue