Jspice3
cktmask.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  /* CKTmodAsk
9  * Ask questions about a specified device.
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 CKTmodAsk(ckt,modfast,which,value,selector)
25 
26 GENERIC *ckt;
27 GENERIC *modfast;
28 int which;
29 IFvalue *value;
30 IFvalue *selector;
31 {
32  int type = ((GENmodel *)modfast)->GENmodType;
33  if (DEVices[type]->DEVmodAsk) {
34  return ( (*DEVices[type]->DEVmodAsk)((CKTcircuit *)ckt,
35  (GENmodel *)modfast,which,value) );
36  }
37  return (E_BADPARM);
38 }
#define E_BADPARM
Definition: iferrmsg.h:26
SPICEdev * DEVices[]
Definition: sconfig.c:109
Definition: types.c:18
int CKTmodAsk(GENERIC *ckt, GENERIC *modfast, int which, IFvalue *value, IFvalue *selector)
Definition: cktmask.c:24
char GENERIC
Definition: ifsim.h:27