53 name = n ? strdup (n) : NULL;
65 name = e.name ? strdup (e.name) : NULL;
77 if (name) free (name);
78 name = e.name ? strdup (e.name) : NULL;
91 if (name) free (name);
111 if (name) free (name);
112 name = n ? strdup (n) : NULL;
125 while (org != NULL) {
128 constant *
c; reference * r;
136 c =
new constant (*(org->
getValue ()));
140 r =
new reference ();
154 for (
variable * var = root; var != NULL; var =
n) {
159 delete var->getValue ();
161 delete var->getSubstrate ();
163 constant *
c = var->getReference()->getResult ();
165 delete var->getReference ();
184 if (!strcmp (var->getName (),
n))
193 return checkee->
check (noundefined);
200 int err = solvee->
solve (data);
217 children->
add (child);
222 children->
del (child);
238 (*it)->passConstants ();
240 (*it)->updateReferences (
this);
242 ret |= (*it)->runSolver ();
245 (*it)->saveResults ();
257 if (var->getPassing () && var->getType () ==
VAR_CONSTANT) {
258 constant *
c = var->getConstant ();
268 constant *
c = var->getConstant ();
269 switch (c->getType ()) {
287 if (!strcmp (var->getName (),
n))
300 var->
setValue (
new constant (*value));
304 var->
setValue (
new constant (*value));
310 #define foreach_equation(eqn) \
311 for (assignment * (eqn) = A (equations); \
312 (eqn) != NULL; (eqn) = A ((eqn)->getNext ()))
315 #define A(a) ((assignment *) (a))
323 char * inst =
eqn->getInstance ();
324 if (inst != NULL &&
eqn->evaluated) {
325 char * result =
A(
eqn)->result;
326 if ((inst[0] !=
'#' && !
strchr (result,
'.')) ||
327 !strcmp (inst,
"#subcircuit")) {
341 reference * r = var->getReference ();
344 constant *
c = r->getResult ();
402 reference * r =
new reference ();
404 constant *
c =
new constant (TAG_DOUBLE);
411 if (r->n) free (r->n);