Jspice3
cktmknod.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  * CKTmkNode(ckt,node)
10  * Tentatively allocate a new circuit equation structure
11  */
12 
13 #include "spice.h"
14 #include <stdio.h>
15 #include "cktdefs.h"
16 #include "iferrmsg.h"
17 #include "util.h"
18 #include "cktext.h"
19 
20 
21 /* ARGSUSED */
22 int
23 CKTmkNode(ckt,node)
24 
25 CKTcircuit *ckt;
26 CKTnode **node;
27 {
28  CKTnode *mynode;
29 
30  mynode = (CKTnode *)MALLOC(sizeof(CKTnode));
31  if (mynode == (CKTnode *)NULL) return (E_NOMEM);
32  mynode->next = (CKTnode *)NULL;
33 
34  if (node) *node = mynode;
35  return (OK);
36 }
int CKTmkNode(CKTcircuit *ckt, CKTnode **node)
Definition: cktmknod.c:23
#define OK
Definition: iferrmsg.h:17
#define MALLOC(x)
Definition: util.h:9
#define NULL
Definition: spdefs.h:121
#define E_NOMEM
Definition: iferrmsg.h:27
struct sCKTnode * next
Definition: cktdefs.h:43