diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index 6de62fa4d..949853767 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -68,21 +68,19 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current) INPinsert(&name, tab); for (i = 0; ; i++) { - char *token; INPgetNetTok(&line, &token, 1); - if (i >= 4) { - txfree(INPgetMod(ckt, token, &thismodel, tab)); + txfree(INPgetMod(ckt, token, &thismodel, tab)); - /* check if using model binning -- pass in line since need 'l' and 'w' */ - if (!thismodel) - txfree(INPgetModBin(ckt, token, &thismodel, tab, line)); + /* check if using model binning -- pass in line since need 'l' and 'w' */ + if (!thismodel) + txfree(INPgetModBin(ckt, token, &thismodel, tab, line)); - if (thismodel) { - INPinsert(&token, tab); - break; - } + if (thismodel) { + INPinsert(&token, tab); + break; + } } if (i >= max_i) { LITERR ("could not find a valid modelname"); @@ -99,44 +97,44 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current) numnodes = i; - if (thismodel->INPmodType != INPtypelook("Mos1") && - thismodel->INPmodType != INPtypelook("Mos2") && - thismodel->INPmodType != INPtypelook("Mos3") && - thismodel->INPmodType != INPtypelook("Mos5") && - thismodel->INPmodType != INPtypelook("Mos6") && - thismodel->INPmodType != INPtypelook("Mos8") && - thismodel->INPmodType != INPtypelook("Mos9") && - thismodel->INPmodType != INPtypelook("BSIM1") && - thismodel->INPmodType != INPtypelook("BSIM2") && - thismodel->INPmodType != INPtypelook("BSIM3") && - thismodel->INPmodType != INPtypelook("BSIM3v32") && - thismodel->INPmodType != INPtypelook("B4SOI") && - thismodel->INPmodType != INPtypelook("B3SOIPD") && - thismodel->INPmodType != INPtypelook("B3SOIFD") && - thismodel->INPmodType != INPtypelook("B3SOIDD") && - thismodel->INPmodType != INPtypelook("BSIM4") && - thismodel->INPmodType != INPtypelook("BSIM4v5") && - thismodel->INPmodType != INPtypelook("BSIM4v6") && - thismodel->INPmodType != INPtypelook("BSIM4v7") && - thismodel->INPmodType != INPtypelook("BSIM3v0") && - thismodel->INPmodType != INPtypelook("BSIM3v1") && - thismodel->INPmodType != INPtypelook("SOI3") && + if (thismodel->INPmodType != INPtypelook("Mos1") && + thismodel->INPmodType != INPtypelook("Mos2") && + thismodel->INPmodType != INPtypelook("Mos3") && + thismodel->INPmodType != INPtypelook("Mos5") && + thismodel->INPmodType != INPtypelook("Mos6") && + thismodel->INPmodType != INPtypelook("Mos8") && + thismodel->INPmodType != INPtypelook("Mos9") && + thismodel->INPmodType != INPtypelook("BSIM1") && + thismodel->INPmodType != INPtypelook("BSIM2") && + thismodel->INPmodType != INPtypelook("BSIM3") && + thismodel->INPmodType != INPtypelook("BSIM3v32") && + thismodel->INPmodType != INPtypelook("B4SOI") && + thismodel->INPmodType != INPtypelook("B3SOIPD") && + thismodel->INPmodType != INPtypelook("B3SOIFD") && + thismodel->INPmodType != INPtypelook("B3SOIDD") && + thismodel->INPmodType != INPtypelook("BSIM4") && + thismodel->INPmodType != INPtypelook("BSIM4v5") && + thismodel->INPmodType != INPtypelook("BSIM4v6") && + thismodel->INPmodType != INPtypelook("BSIM4v7") && + thismodel->INPmodType != INPtypelook("BSIM3v0") && + thismodel->INPmodType != INPtypelook("BSIM3v1") && + thismodel->INPmodType != INPtypelook("SOI3") && #ifdef CIDER - thismodel->INPmodType != INPtypelook("NUMOS") && + thismodel->INPmodType != INPtypelook("NUMOS") && #endif #ifdef ADMS - thismodel->INPmodType != INPtypelook("ekv") && - thismodel->INPmodType != INPtypelook("psp102") && + thismodel->INPmodType != INPtypelook("ekv") && + thismodel->INPmodType != INPtypelook("psp102") && #endif - thismodel->INPmodType != INPtypelook("HiSIM2") && - thismodel->INPmodType != INPtypelook("HiSIMHV1") && - thismodel->INPmodType != INPtypelook("HiSIMHV2")) - { - LITERR ("incorrect model type"); - return; - } - type = thismodel->INPmodType; - mdfast = thismodel->INPmodfast; + thismodel->INPmodType != INPtypelook("HiSIM2") && + thismodel->INPmodType != INPtypelook("HiSIMHV1") && + thismodel->INPmodType != INPtypelook("HiSIMHV2")) + { + LITERR ("incorrect model type"); + return; + } + type = thismodel->INPmodType; + mdfast = thismodel->INPmodfast; IFC (newInstance, (ckt, mdfast, &fast, name));