devices/mos6, add missing files mos6del.c and mos6mdel.c
this is a plain copy from mos3
This commit is contained in:
parent
fb6b4adaa5
commit
93b62297d8
|
|
@ -7,6 +7,7 @@ libmos6_la_SOURCES = \
|
|||
mos6ask.c \
|
||||
mos6conv.c \
|
||||
mos6defs.h \
|
||||
mos6del.c \
|
||||
mos6dest.c \
|
||||
mos6ext.h \
|
||||
mos6ic.c \
|
||||
|
|
@ -15,6 +16,7 @@ libmos6_la_SOURCES = \
|
|||
mos6itf.h \
|
||||
mos6load.c \
|
||||
mos6mask.c \
|
||||
mos6mdel.c \
|
||||
mos6mpar.c \
|
||||
mos6par.c \
|
||||
mos6set.c \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mos6defs.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
MOS6delete(GENmodel *inModel, IFuid name, GENinstance **inst)
|
||||
{
|
||||
MOS6model *model = (MOS6model *)inModel;
|
||||
MOS6instance **fast = (MOS6instance **)inst;
|
||||
MOS6instance **prev = NULL;
|
||||
MOS6instance *here;
|
||||
|
||||
for( ; model ; model = model->MOS6nextModel) {
|
||||
prev = &(model->MOS6instances);
|
||||
for(here = *prev; here ; here = *prev) {
|
||||
if(here->MOS6name == name || (fast && here==*fast) ) {
|
||||
*prev= here->MOS6nextInstance;
|
||||
FREE(here);
|
||||
return(OK);
|
||||
}
|
||||
prev = &(here->MOS6nextInstance);
|
||||
}
|
||||
}
|
||||
return(E_NODEV);
|
||||
}
|
||||
|
|
@ -52,8 +52,8 @@ SPICEdev MOS6info = {
|
|||
/* DEVacLoad */ NULL, /* MOS6acLoad, XXX */
|
||||
/* DEVaccept */ NULL,
|
||||
/* DEVdestroy */ MOS6destroy,
|
||||
/* DEVmodDelete */ NULL,
|
||||
/* DEVdelete */ NULL,
|
||||
/* DEVmodDelete */ MOS6mDelete,
|
||||
/* DEVdelete */ MOS6delete,
|
||||
/* DEVsetic */ MOS6getic,
|
||||
/* DEVask */ MOS6ask,
|
||||
/* DEVmodAsk */ MOS6mAsk,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "mos6defs.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
|
||||
int
|
||||
MOS6mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
MOS6model **model = (MOS6model **)inModel;
|
||||
MOS6model *modfast = (MOS6model *)kill;
|
||||
MOS6instance *here;
|
||||
MOS6instance *prev = NULL;
|
||||
MOS6model **oldmod;
|
||||
oldmod = model;
|
||||
for( ; *model ; model = &((*model)->MOS6nextModel)) {
|
||||
if( (*model)->MOS6modName == modname ||
|
||||
(modfast && *model == modfast) ) goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->MOS6nextModel; /* cut deleted device out of list */
|
||||
for(here = (*model)->MOS6instances ; here ; here = here->MOS6nextInstance) {
|
||||
if(prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
|
||||
}
|
||||
|
|
@ -1975,11 +1975,13 @@
|
|||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6ask.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6conv.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6del.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6dest.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6ic.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6init.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6load.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mask.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mdel.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mpar.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6par.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6set.c" />
|
||||
|
|
|
|||
|
|
@ -2413,11 +2413,13 @@ lib /machine:x64 /def:..\..\fftw-3.3.4-dll64\libfftw3-3.def /out:$(IntDir)libfft
|
|||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6ask.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6conv.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6del.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6dest.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6ic.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6init.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6load.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mask.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mdel.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mpar.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6par.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6set.c" />
|
||||
|
|
|
|||
|
|
@ -2379,11 +2379,13 @@
|
|||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6ask.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6conv.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6del.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6dest.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6ic.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6init.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6load.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mask.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mdel.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6mpar.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6par.c" />
|
||||
<ClCompile Include="..\src\spicelib\devices\mos6\mos6set.c" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue