1 /**********
2 Copyright 1990 Regents of the University of California.  All rights reserved.
3 Author: 1985 Gordon Jacobs
4 **********/
5 
6 #include "ngspice/ngspice.h"
7 #include "swdefs.h"
8 #include "ngspice/ifsim.h"
9 #include "ngspice/sperror.h"
10 #include "ngspice/suffix.h"
11 
12 
13 int
SWparam(int param,IFvalue * value,GENinstance * inst,IFvalue * select)14 SWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
15 {
16     SWinstance *here = (SWinstance *) inst;
17 
18     NG_IGNORE(select);
19 
20     switch (param) {
21     case SW_IC_ON:
22         if (value->iValue)
23             here->SWzero_stateGiven = TRUE;
24         break;
25     case SW_IC_OFF:
26         if (value->iValue)
27             here->SWzero_stateGiven = FALSE;
28         break;
29     default:
30         return E_BADPARM;
31     }
32 
33     return OK;
34 }
35