Jspice3
cktfnode.c
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1985 Thomas L. Quarles
5  1993 Stephen R. Whiteley
6 ****************************************************************************/
7 
8  /* CKTfndNode
9  * find the given node given its name and return the node pointer
10  */
11 
12 #include "spice.h"
13 #include <stdio.h>
14 #include "cktdefs.h"
15 #include "sperror.h"
16 #include "cktext.h"
17 
18 
19 /* ARGSUSED */
20 int
21 CKTfndNode(ckt,node,name)
22 
23 GENERIC *ckt;
24 GENERIC **node;
25 IFuid name;
26 {
27  CKTnode *here;
28 
29  for (here = ((CKTcircuit *)ckt)->CKTnodes; here; here = here->next) {
30  if (here->name == name) {
31  if (node) *node = (char *)here;
32  return (OK);
33  }
34  }
35  return (E_NOTFOUND);
36 }
IFuid name
Definition: cktdefs.h:31
int CKTfndNode(GENERIC *ckt, GENERIC **node, IFuid name)
Definition: cktfnode.c:21
#define E_NOTFOUND
Definition: iferrmsg.h:35
#define OK
Definition: iferrmsg.h:17
GENERIC * IFuid
Definition: ifsim.h:72
struct sCKTnode * next
Definition: cktdefs.h:43
char GENERIC
Definition: ifsim.h:27