allow hyphens '-' in model names
This commit is contained in:
parent
09c9370e43
commit
181e8746a6
|
|
@ -58,7 +58,7 @@ void INP2C(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
|
||||
saveline = line;
|
||||
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
|
||||
if (*model && (strcmp(model, "c") != 0)) {
|
||||
/* token isn't null */
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname1, tab, &node1);
|
||||
INPgetNetTok(&line, &nname2, 1);
|
||||
INPtermInsert(ckt, &nname2, tab, &node2);
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||
if (thismodel != NULL) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname2, tab, &node2);
|
||||
INPgetNetTok(&line, &nname3, 1);
|
||||
INPtermInsert(ckt, &nname3, tab, &node3);
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||
if (thismodel != NULL) {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
|
||||
saveline = line;
|
||||
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
|
||||
if (*model && (strcmp(model, "l") != 0)) {
|
||||
/* token isn't null */
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ void INP2N(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
|
||||
saveline = line; /* save then old pointer */
|
||||
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
|
||||
if (*model) {
|
||||
/* token isn't null */
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ void INP2O(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname3, tab, &node3);
|
||||
INPgetNetTok(&line, &nname4, 1);
|
||||
INPtermInsert(ckt, &nname4, tab, &node4);
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
if (INPlookMod(model)) {
|
||||
/* do nothing for now */
|
||||
/* no action required */
|
||||
|
|
@ -62,7 +62,7 @@ void INP2O(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
/*
|
||||
nname4 = model;
|
||||
INPtermInsert(ckt,&nname4,tab,&node4);
|
||||
INPgetTok(&line,&model,1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
*/
|
||||
}
|
||||
INPinsert(&model, tab);
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ int num, i;
|
|||
INPgetTok(&line,&ground,1);
|
||||
INPtermInsert(ckt,&ground,tab,&groundnode);
|
||||
|
||||
INPgetTok(&line,&model,1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
if(*model) { /* token isn't null */
|
||||
INPinsert(&model,tab);
|
||||
current->error = INPgetMod(ckt,model,&thismodel,tab);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
|
||||
saveline = line; /* save then old pointer */
|
||||
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
|
||||
if (*model && (strcmp(model, "r") != 0)) {
|
||||
/* token isn't null */
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ void INP2S(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname3, tab, &node3);
|
||||
INPgetNetTok(&line, &nname4, 1);
|
||||
INPtermInsert(ckt, &nname4, tab, &node4);
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||
if (thismodel != NULL) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname2, tab, &node2);
|
||||
INPgetNetTok(&line, &nname3, 1);
|
||||
INPtermInsert(ckt, &nname3, tab, &node3);
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||
if (thismodel != NULL) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ void INP2W(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
parm = INPgetValue(ckt, &line, IF_INSTANCE, tab);
|
||||
ptemp.uValue = parm->uValue;
|
||||
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||
if (thismodel != NULL) {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ int lenvalgiven = 0;
|
|||
INPgetNetTok(&line,&ground2,1);
|
||||
INPtermInsert(ckt,&ground2,tab,&gnode2);
|
||||
|
||||
INPgetTok(&line,&model,1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
if(*model) { /* token isn't null */
|
||||
INPinsert(&model,tab);
|
||||
current->error = INPgetMod(ckt,model,&thismodel,tab);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ void INP2Z(CKTcircuit *ckt, INPtables * tab, struct card *current)
|
|||
INPtermInsert(ckt, &nname2, tab, &node2);
|
||||
INPgetNetTok(&line, &nname3, 1);
|
||||
INPtermInsert(ckt, &nname3, tab, &node3);
|
||||
INPgetTok(&line, &model, 1);
|
||||
INPgetNetTok(&line, &model, 1);
|
||||
INPinsert(&model, tab);
|
||||
current->error = INPgetMod(ckt, model, &thismodel, tab);
|
||||
if (thismodel != NULL) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab)
|
|||
|
||||
INPgetTok(&line, &modname, 1); /* throw away '.model' */
|
||||
tfree(modname);
|
||||
INPgetTok(&line, &modname, 1); /* get model name */
|
||||
INPgetNetTok(&line, &modname, 1); /* get model name */
|
||||
INPinsert(&modname, tab); /* stick model name into table */
|
||||
INPgetTok(&line, &type_name, 1); /* get model type */
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ create_model(CKTcircuit *ckt, INPmodel *modtmp, INPtables *tab)
|
|||
|
||||
INPgetTok(&line, &parm, 1); /* throw away '.model' */
|
||||
tfree(parm);
|
||||
INPgetTok(&line, &parm, 1); /* throw away 'modname' */
|
||||
INPgetNetTok(&line, &parm, 1); /* throw away 'modname' */
|
||||
tfree(parm);
|
||||
|
||||
while (*line) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue