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
|
|
|
|
|
*/
|
|
|
|
|
|
2011-12-11 19:05:00 +01:00
|
|
|
#include "ngspice/ngspice.h"
|
|
|
|
|
#include "ngspice/ifsim.h"
|
|
|
|
|
#include "ngspice/sperror.h"
|
|
|
|
|
#include "ngspice/cktdefs.h"
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ARGSUSED */
|
|
|
|
|
int
|
2010-08-11 20:54:31 +02:00
|
|
|
CKTfndNode(CKTcircuit *ckt, CKTnode **node, IFuid name)
|
2000-04-27 22:03:57 +02:00
|
|
|
{
|
2000-06-17 16:42:03 +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) {
|
2010-08-11 20:54:31 +02:00
|
|
|
if(node) *node = here;
|
2000-04-27 22:03:57 +02:00
|
|
|
return(OK);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return(E_NOTFOUND);
|
|
|
|
|
}
|