Jspice3
cktmpar.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  /* CKTmodParam
9  * attach the given parameter to the specified model in the given circuit
10  */
11 
12 #include "spice.h"
13 #include <stdio.h>
14 #include "devdefs.h"
15 #include "sperror.h"
16 #include "util.h"
17 #include "cktext.h"
18 
19 
20 extern SPICEdev *DEVices[];
21 
22 /* ARGSUSED */
23 int
24 CKTmodParam(ckt,modfast,param,val,selector)
25 
26 GENERIC *ckt;
27 GENERIC *modfast;
28 int param;
29 IFvalue *val;
30 IFvalue *selector;
31 {
32  int type = ((GENmodel *)modfast)->GENmodType;
33 
34  if (DEVices[type]->DEVmodParam) {
35  return ( (*DEVices[type]->DEVmodParam)(param,val,
36  (GENmodel *)modfast) );
37  }
38  else {
39  return (E_BADPARM);
40  }
41 }
SPICEdev * DEVices[]
Definition: sconfig.c:109
#define E_BADPARM
Definition: iferrmsg.h:26
int CKTmodParam(GENERIC *ckt, GENERIC *modfast, int param, IFvalue *val, IFvalue *selector)
Definition: cktmpar.c:24
Definition: types.c:18
char GENERIC
Definition: ifsim.h:27