|
|
@ -29,9 +29,7 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *modPtr, GENinstance **inInstPtr, IFuid name |
|
|
if(!modPtr) |
|
|
if(!modPtr) |
|
|
return E_NOMOD; |
|
|
return E_NOMOD; |
|
|
|
|
|
|
|
|
type = modPtr->GENmodType; |
|
|
|
|
|
|
|
|
|
|
|
error = CKTfndDev(ckt, &type, &instPtr, name); |
|
|
|
|
|
|
|
|
error = CKTfndDev(ckt, NULL, &instPtr, name); |
|
|
|
|
|
|
|
|
if (error == OK) { |
|
|
if (error == OK) { |
|
|
if (inInstPtr) |
|
|
if (inInstPtr) |
|
|
@ -39,6 +37,8 @@ CKTcrtElt(CKTcircuit *ckt, GENmodel *modPtr, GENinstance **inInstPtr, IFuid name |
|
|
return E_EXISTS; |
|
|
return E_EXISTS; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type = modPtr->GENmodType; |
|
|
|
|
|
|
|
|
#ifdef TRACE |
|
|
#ifdef TRACE |
|
|
/*------ SDB debug statement -------*/ |
|
|
/*------ SDB debug statement -------*/ |
|
|
printf("In CKTcrtElt, about to tmalloc new model, type = %d. . . \n", type); |
|
|
printf("In CKTcrtElt, about to tmalloc new model, type = %d. . . \n", type); |
|
|
|