Jspice3
inpapnam.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 "inpdefs.h"
11 #include "iferrmsg.h"
12 
13 
14 int
15 INPapName(ckt,type,analPtr,parmname,value)
16 
17 GENERIC *ckt;
18 int type;
19 GENERIC *analPtr;
20 char * parmname;
21 IFvalue *value;
22 {
23  int i, n;
24  IFparm *prm;
25 
26  if (parmname && ft_sim->analyses[type]) {
27 
28  prm = ft_sim->analyses[type]->analysisParms;
29  n = ft_sim->analyses[type]->numParms;
30 
31  for (i = 0; i < n; i++) {
32  if (!strcmp(parmname,prm[i].keyword))
33  return (*(ft_sim->setAnalysisParm))(ckt, analPtr,
34  prm[i].id, value, (IFvalue*)NULL);
35  }
36  }
37  return (E_BADPARM);
38 }
IFsimulator * ft_sim
Definition: main.c:111
#define E_BADPARM
Definition: iferrmsg.h:26
int id
Definition: ifsim.h:56
int INPapName(GENERIC *ckt, int type, GENERIC *analPtr, char *parmname, IFvalue *value)
Definition: inpapnam.c:15
int numParms
Definition: ifsim.h:339
#define NULL
Definition: spdefs.h:121
Definition: types.c:18
IFparm * analysisParms
Definition: ifsim.h:340
Definition: ifsim.h:54
IFanalysis ** analyses
Definition: ifsim.h:464
char GENERIC
Definition: ifsim.h:27