Jspice3
cktnum2n.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  /* CKTnum2nod
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 CKTnode *
21 CKTnum2nod(ckt,node)
22 
23 CKTcircuit *ckt;
24 int node;
25 {
26  CKTnode *here;
27 
28  for (here = ((CKTcircuit *)ckt)->CKTnodes; here; here = here->next) {
29  if (here->number == node) {
30  return (here);
31  }
32  }
33  return ((CKTnode *)NULL);
34 }
#define NULL
Definition: spdefs.h:121
struct sCKTnode * next
Definition: cktdefs.h:43
int number
Definition: cktdefs.h:39
CKTnode * CKTnum2nod(CKTcircuit *ckt, int node)
Definition: cktnum2n.c:21