adms3, fix some types

This commit is contained in:
rlar 2012-02-07 18:43:57 +00:00
parent e396b15104
commit f38aa32b5f
4 changed files with 14 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2012-02-07 Robert Larice
* src/include/ngspice/devdefs.h ,
* src/spicelib/devices/dev.c ,
* src/spicelib/devices/adms/admst/ngspice.xml :
adms3, fix some types
2012-02-07 Robert Larice
* src/frontend/vectors.c ,
* src/frontend/parser/complete.c ,

View File

@ -107,8 +107,8 @@ typedef struct SPICEdev {
typedef struct SPICEadmsdev {
SPICEdev spicedev;
int (*DEVunsetup)(GENmodel*,CKTcircuit*);
int (*mkn)(GENmodel *, CKTcircuit *);
int (*mkj)(CKTcircuit *, GENmodel *, IFuid);
int (*mkn)(CKTcircuit *, CKTnode **, IFuid, char *);
double *(*mkj)(SMPmatrix *, int, int);
} SPICEadmsdev;
#endif

View File

@ -4330,8 +4330,8 @@ int $(module)setup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *
register $(module)instance *here;
typedef int FP1(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix);
typedef double * FP2(SMPmatrix *Matrix, int Row, int Col);
FP1*myCKTmkVolt=(FP1*)get_$(module)_info()->mkn;
FP2*mySMPmakeElt=(FP2*)get_$(module)_info()->mkj;
FP1 *myCKTmkVolt = get_$(module)_info()->mkn;
FP2 *mySMPmakeElt = get_$(module)_info()->mkj;
/* loop through all the $(module) device models */
for ( ;model != NULL ;model = model->$(module)nextModel )

View File

@ -222,12 +222,12 @@ int load_vadev(CKTcircuit *ckt, char *name)
return -1;
}
device->mkn = ((int (*)(GENmodel *, CKTcircuit *)) &CKTmkVolt);
device->mkj = ((int (*)(CKTcircuit *, GENmodel *, IFuid)) &SMPmakeElt);
device->mkn = CKTmkVolt;
device->mkj = SMPmakeElt;
DEVices = TREALLOC(SPICEdev *, DEVices, DEVNUM + 1);
printf("Added device: %s from dynamic library %s\n", ((SPICEdev *)device)->DEVpublic.name, libname);
DEVices[DEVNUM++] = (SPICEdev *)device;
printf("Added device: %s from dynamic library %s\n", device->spicedev.DEVpublic.name, libname);
DEVices[DEVNUM++] = & (device->spicedev);
varelink(ckt);
return DEVNUM-1;
}