1 /**********
2 Copyright 1990 Regents of the University of California.  All rights reserved.
3 Author: 1985 Thomas L. Quarles
4 **********/
5 /*
6  */
7 
8     /* CKTfndNode
9      *  find the given node given its name and return the node pointer
10      */
11 
12 #include "ngspice/ngspice.h"
13 #include "ngspice/ifsim.h"
14 #include "ngspice/sperror.h"
15 #include "ngspice/cktdefs.h"
16 
17 
18 
19 /* ARGSUSED */
20 int
CKTfndNode(CKTcircuit * ckt,CKTnode ** node,IFuid name)21 CKTfndNode(CKTcircuit *ckt, CKTnode **node, IFuid name)
22 {
23     CKTnode *here;
24 
25     for (here = ckt->CKTnodes; here; here = here->next)  {
26         if(here->name == name) {
27             if(node) *node = here;
28             return(OK);
29         }
30     }
31     return(E_NOTFOUND);
32 }
33