77 assert (
n->name != NULL);
135 n->
name = str ? strdup (str) : NULL;
170 for (prev = NULL, n =
root; n != NULL; prev =
n, n = n->
next) {
203 if (
n->name != NULL && str != NULL && !strcmp (
n->name, str))
212 if (
n->name != NULL && str != NULL && !strcmp (
n->name, str))
241 if (!strcmp (name,
n->name))
return n;
252 int len = (n->
nNodes - 1) + 1;
253 txt = (
char *) malloc (len);
txt[0] =
'\0';
257 txt = (
char *) realloc (
txt, len);
281 if (!strcmp (
n->name,
"gnd")) {
317 for (j = i = 0; j < nl->
nNodes - 1; i++, j++) {
318 if (nl->
nodes[i] == n) i++;
336 circuit *
c1 = n->nodes[0]->getCircuit ();
337 circuit *
c2 = n->nNodes > 1 ? n->nodes[1]->getCircuit () : NULL;
349 static int insfunc (
struct nodelist_t *
n1,
struct nodelist_t *
n2) {
352 return p1 >= 0 && (p1 <= p2 || p2 < 0);
369 for (prev = NULL, nl =
root; nl != NULL; prev = nl, nl = nl->
next) {
454 int p,
i, ports, MaxPorts, len =
length ();
457 for (i = 0; i < len; i++) {
460 for (MaxPorts = -1, p = 0, nl =
root; nl != NULL; nl = nl->
next) {
462 if (ports > MaxPorts || MaxPorts < 0 || ports == -1) {
466 if (ports == -1)
break;
493 for (
struct nodelist_t *
n =
root;
n != NULL;
n =
n->next) {
495 for (
int i = 0;
i <
n->nNodes;
i++) {
void addCircuitNode(struct nodelist_t *, node *)
struct nodelist_t * getRoot(void)
circuit * getCircuit(void)
void sortedNodes(node **, node **)
void release(struct nodelist_t *)
struct nodelist_t * getNode(int)
struct nodelist_t * getLastNode(void)
static int insfunc(struct nodelist_t *n1, struct nodelist_t *n2)
int getSize(void)
Get the number of ports the circuit element has.
void delCircuitNode(struct nodelist_t *, node *)
base class for qucs circuit elements.
struct nodelist_t * copy(struct nodelist_t *)
void append(char *, int intern=0)
Declaration sizeof(struct vcd_scope))
The circuit class header file.
void insert(struct nodelist_t *)
void logprint(int level, const char *format,...)
struct nodelist_t ** narray
struct nodelist_t * create(char *, int)
void add(char *, int intern=0)
char * getNodeString(int)
static int sortfunc(struct nodelist_t *n)