diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml
index 4357baa81..6119aa66d 100644
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml
+++ b/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml
@@ -40,35 +40,29 @@
-
#include "ngspice/ngspice.h"
#include "$(module)defs.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
-int $(module)delete(GENmodel *inModel, IFuid name, GENinstance **inInst)
-
+int
+$(module)delete(GENmodel *model, IFuid name, GENinstance **kill)
{
- register $(module)model *model = ($(module)model*)inModel;
- register $(module)instance **fast =($(module)instance**)inInst;
-
- $(module)instance **prev = NULL;
- $(module)instance *here;
-
- for ( ; model ; model = model->$(module)nextModel ) {
- prev = &(model->$(module)instances);
- for (here = *prev; here ; here = *prev) {
- if(here->$(module)name == name || (fast && here==*fast) ) {
- *prev = here->$(module)nextInstance;
- FREE(here);
- return(OK);
- }
-
- }
- }
- return(E_NODEV);
-}
+ for (; model; model = model->GENnextModel) {
+ GENinstance **prev = &(model->GENinstances);
+ GENinstance *here = *prev;
+ for (; here; here = *prev) {
+ if (here->GENname == name || (kill && here == *kill)) {
+ *prev = here->GENnextInstance;
+ FREE(here);
+ return OK;
+ }
+ prev = &(here->GENnextInstance);
+ }
+ }
+ return E_NODEV;
+}