Jspice3
Main Page
Data Structures
Files
File List
Globals
cktmkvol.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
/* CKTmkVolt
9
* make the given name a 'node' of type current in the
10
* specified circuit
11
*/
12
13
#include "
spice.h
"
14
#include <stdio.h>
15
#include "
cktdefs.h
"
16
#include "
sperror.h
"
17
#include "
util.h
"
18
#include "
cktext.h
"
19
20
21
/* ARGSUSED */
22
int
23
CKTmkVolt
(ckt,node,basename,suffix)
24
25
CKTcircuit
*ckt;
26
CKTnode
**node;
27
IFuid
basename;
28
char
*suffix;
29
{
30
IFuid
uid;
31
int
error;
32
CKTnode
*mynode;
33
CKTnode
*checknode;
34
35
error =
CKTmkNode
(ckt,&mynode);
36
if
(error)
return
(error);
37
checknode = mynode;
38
error = (*(
SPfrontEnd
->IFnewUid))((
GENERIC
*)ckt,&uid,basename,
39
suffix,
UID_SIGNAL
,(
GENERIC
**)&checknode);
40
if
(error) {
41
FREE
(mynode);
42
if
(node) *node = checknode;
43
return
(error);
44
}
45
mynode->
name
= uid;
46
mynode->
type
=
SP_VOLTAGE
;
47
if
(node) *node = mynode;
48
error =
CKTlinkEq
(ckt,mynode);
49
return
(error);
50
}
cktdefs.h
sCKTnode::name
IFuid name
Definition:
cktdefs.h:31
CKTcircuit
Definition:
cktdefs.h:62
sCKTnode
Definition:
cktdefs.h:30
SPfrontEnd
IFfrontEnd * SPfrontEnd
Definition:
main.c:917
UID_SIGNAL
#define UID_SIGNAL
Definition:
ifsim.h:84
FREE
#define FREE(ptr)
Definition:
spdefs.h:436
CKTlinkEq
int CKTlinkEq()
SP_VOLTAGE
#define SP_VOLTAGE
Definition:
cktdefs.h:34
IFuid
GENERIC * IFuid
Definition:
ifsim.h:72
sperror.h
sCKTnode::type
int type
Definition:
cktdefs.h:32
util.h
spice.h
cktext.h
CKTmkVolt
int CKTmkVolt(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix)
Definition:
cktmkvol.c:23
CKTmkNode
int CKTmkNode()
GENERIC
char GENERIC
Definition:
ifsim.h:27
src
lib
ckt
cktmkvol.c
Generated by
1.8.11