You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
882 B
38 lines
882 B
/**********
|
|
Copyright 1992 Regents of the University of California. All rights
|
|
reserved.
|
|
Author: 1992 Charles Hough
|
|
**********/
|
|
|
|
|
|
#include "ngspice.h"
|
|
#include <stdio.h>
|
|
#include "txldefs.h"
|
|
#include "sperror.h"
|
|
#include "suffix.h"
|
|
|
|
|
|
int
|
|
TXLdelete(inModel,name,inst)
|
|
GENmodel *inModel;
|
|
IFuid name;
|
|
GENinstance **inst;
|
|
{
|
|
TXLmodel *model = (TXLmodel *)inModel;
|
|
TXLinstance **fast = (TXLinstance **)inst;
|
|
TXLinstance **prev = NULL;
|
|
TXLinstance *here;
|
|
|
|
for( ; model ; model = model->TXLnextModel) {
|
|
prev = &(model->TXLinstances);
|
|
for(here = *prev; here ; here = *prev) {
|
|
if(here->TXLname == name || (fast && here==*fast) ) {
|
|
*prev= here->TXLnextInstance;
|
|
FREE(here);
|
|
return(OK);
|
|
}
|
|
prev = &(here->TXLnextInstance);
|
|
}
|
|
}
|
|
return(E_NODEV);
|
|
}
|