ngspice/src/spicelib/analysis/cktfnode.c

33 lines
619 B
C
Raw Normal View History

2000-04-27 22:03:57 +02:00
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
**********/
/*
*/
/* CKTfndNode
* find the given node given its name and return the node pointer
*/
#include "ngspice.h"
#include "ifsim.h"
#include "sperror.h"
#include "cktdefs.h"
/* ARGSUSED */
int
2010-07-07 19:32:40 +02:00
CKTfndNode(CKTcircuit *ckt, void **node, IFuid name)
2000-04-27 22:03:57 +02:00
{
CKTnode *here;
2000-04-27 22:03:57 +02:00
2010-07-07 19:32:40 +02:00
for (here = ckt->CKTnodes; here; here = here->next) {
2000-04-27 22:03:57 +02:00
if(here->name == name) {
if(node) *node = (char *)here;
return(OK);
}
}
return(E_NOTFOUND);
}