Jspice3
cktneweq.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  /*
9  * CKTnewEq(ckt,node,name)
10  * Allocate a new circuit equation number (returned) in the specified
11  * circuit to contain a new equation or node
12  * returns -1 for failure to allocate a node number
13  *
14  */
15 
16 #include "spice.h"
17 #include <stdio.h>
18 #include "cktdefs.h"
19 #include "iferrmsg.h"
20 #include "util.h"
21 #include "cktext.h"
22 
23 
24 int
25 CKTnewEq(inCkt,node,name)
26 
27 GENERIC *inCkt;
28 GENERIC **node;
29 IFuid name;
30 {
31  CKTnode *mynode;
32  CKTcircuit *ckt = (CKTcircuit *)inCkt;
33  int error;
34 
35  error = CKTmkNode(ckt,&mynode);
36  if (error) return (error);
37 
38  if (node) *node = (GENERIC *)mynode;
39  mynode->name = name;
40 
41  error = CKTlinkEq(ckt,mynode);
42 
43  return (error);
44 }
IFuid name
Definition: cktdefs.h:31
int CKTnewEq(GENERIC *inCkt, GENERIC **node, IFuid name)
Definition: cktneweq.c:25
int CKTlinkEq()
GENERIC * IFuid
Definition: ifsim.h:72
int CKTmkNode()
char GENERIC
Definition: ifsim.h:27