F.-request 85: save currents in subcircuits

Separate handling .ic/.nodeset and .save .
Add i(Vxx) to  address translation.
Vxx#branch is not supported.
This commit is contained in:
Holger Vogt 2021-10-20 13:56:43 +02:00
parent bd0113ea9a
commit e90b3e711b
1 changed files with 25 additions and 1 deletions

View File

@ -1176,7 +1176,31 @@ translate(struct card *deck, char *formal, char *actual, char *scname, const cha
switch (dev_type) {
case '.':
if (ciprefix(".ic", s) || ciprefix(".nodeset", s) || ciprefix(".save", s)) {
if (ciprefix(".save", s)) {
while ((paren_ptr = strchr(s, '(')) != NULL) {
bool curr = FALSE;
if (ciprefix(" i(", paren_ptr - 2))
curr = TRUE;
name = paren_ptr + 1;
if ((paren_ptr = strchr(name, ')')) == NULL) {
fprintf(cp_err, "Error: missing closing ')' for .save statement %s\n", c->line);
goto quit;
}
bxx_put_substring(&buffer, s, name);
if (curr)
translate_inst_name(&buffer, scname, name, paren_ptr);
else
translate_node_name(&buffer, scname, name, paren_ptr);
s = paren_ptr;
}
bxx_put_cstring(&buffer, s); /* rest of line */
break;
}
else if (ciprefix(".ic", s) || ciprefix(".nodeset", s)) {
while ((paren_ptr = strchr(s, '(')) != NULL) {
name = paren_ptr + 1;