Jspice3
Main Page
Data Structures
Files
File List
Globals
cktnewan.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
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
cktdefs.h
"
11
#include "
tskdefs.h
"
12
#include "
jobdefs.h
"
13
#include "
util.h
"
14
#include "
iferrmsg.h
"
15
16
17
/* ARGSUSED */
18
int
19
CKTnewAnal
(ckt,
type
,name,analPtr,taskPtr)
20
21
GENERIC
*ckt;
22
int
type
;
23
IFuid
name;
24
GENERIC
**analPtr;
25
GENERIC
*taskPtr;
26
{
27
if
(type == 0) {
28
/* special case for analysis type 0 == option card */
29
*analPtr = taskPtr;
/* pointer to the task itself */
30
(*(
JOB
**)analPtr)->JOBname = name;
31
(*(
JOB
**)analPtr)->JOBtype =
type
;
32
return
(
OK
);
/* doesn't need to be created */
33
}
34
*analPtr = (
GENERIC
*)
MALLOC
(
analInfo
[type]->size);
35
if
(*analPtr ==
NULL
)
return
(
E_NOMEM
);
36
(*(
JOB
**)analPtr)->JOBname = name;
37
(*(
JOB
**)analPtr)->JOBtype =
type
;
38
(*(
JOB
**)analPtr)->JOBnextJob = ((
TSKtask
*)taskPtr)->jobs;
39
((
TSKtask
*)taskPtr)->jobs = (
JOB
*)*analPtr;
40
return
(
OK
);
41
}
cktdefs.h
CKTnewAnal
int CKTnewAnal(GENERIC *ckt, int type, IFuid name, GENERIC **analPtr, GENERIC *taskPtr)
Definition:
cktnewan.c:19
jobdefs.h
sJOB
Definition:
cktdefs.h:23
analInfo
SPICEanalysis * analInfo[]
Definition:
sconfig.c:57
OK
#define OK
Definition:
iferrmsg.h:17
IFuid
GENERIC * IFuid
Definition:
ifsim.h:72
MALLOC
#define MALLOC(x)
Definition:
util.h:9
NULL
#define NULL
Definition:
spdefs.h:121
type
Definition:
types.c:18
E_NOMEM
#define E_NOMEM
Definition:
iferrmsg.h:27
util.h
spice.h
iferrmsg.h
tskdefs.h
sCKTmodHead::type
int type
Definition:
cktdefs.h:56
TSKtask
Definition:
tskdefs.h:11
GENERIC
char GENERIC
Definition:
ifsim.h:27
src
lib
ckt
cktnewan.c
Generated by
1.8.11