From 181e8746a633a4dfb213729c68e57b3c18ba0fcd Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 4 Mar 2018 14:16:12 +0100 Subject: [PATCH] allow hyphens '-' in model names --- src/spicelib/parser/inp2c.c | 2 +- src/spicelib/parser/inp2d.c | 2 +- src/spicelib/parser/inp2j.c | 2 +- src/spicelib/parser/inp2l.c | 2 +- src/spicelib/parser/inp2n.c | 2 +- src/spicelib/parser/inp2o.c | 4 ++-- src/spicelib/parser/inp2p.c | 2 +- src/spicelib/parser/inp2r.c | 2 +- src/spicelib/parser/inp2s.c | 2 +- src/spicelib/parser/inp2u.c | 2 +- src/spicelib/parser/inp2w.c | 2 +- src/spicelib/parser/inp2y.c | 2 +- src/spicelib/parser/inp2z.c | 2 +- src/spicelib/parser/inpdomod.c | 2 +- src/spicelib/parser/inpgmod.c | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/spicelib/parser/inp2c.c b/src/spicelib/parser/inp2c.c index 823f221c1..d8d265d3a 100644 --- a/src/spicelib/parser/inp2c.c +++ b/src/spicelib/parser/inp2c.c @@ -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 */ diff --git a/src/spicelib/parser/inp2d.c b/src/spicelib/parser/inp2d.c index 59952dc8f..3fa510c0b 100644 --- a/src/spicelib/parser/inp2d.c +++ b/src/spicelib/parser/inp2d.c @@ -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) { diff --git a/src/spicelib/parser/inp2j.c b/src/spicelib/parser/inp2j.c index 0021e3522..b0c174506 100644 --- a/src/spicelib/parser/inp2j.c +++ b/src/spicelib/parser/inp2j.c @@ -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) { diff --git a/src/spicelib/parser/inp2l.c b/src/spicelib/parser/inp2l.c index d81294630..0921c1908 100644 --- a/src/spicelib/parser/inp2l.c +++ b/src/spicelib/parser/inp2l.c @@ -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 */ diff --git a/src/spicelib/parser/inp2n.c b/src/spicelib/parser/inp2n.c index 3cccbbb15..164375aaf 100644 --- a/src/spicelib/parser/inp2n.c +++ b/src/spicelib/parser/inp2n.c @@ -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 */ diff --git a/src/spicelib/parser/inp2o.c b/src/spicelib/parser/inp2o.c index 82600f54f..984ec7986 100644 --- a/src/spicelib/parser/inp2o.c +++ b/src/spicelib/parser/inp2o.c @@ -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); diff --git a/src/spicelib/parser/inp2p.c b/src/spicelib/parser/inp2p.c index 13387e787..8a1ccf0c3 100644 --- a/src/spicelib/parser/inp2p.c +++ b/src/spicelib/parser/inp2p.c @@ -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); diff --git a/src/spicelib/parser/inp2r.c b/src/spicelib/parser/inp2r.c index 1f5bf28b2..734dea4f2 100644 --- a/src/spicelib/parser/inp2r.c +++ b/src/spicelib/parser/inp2r.c @@ -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 */ diff --git a/src/spicelib/parser/inp2s.c b/src/spicelib/parser/inp2s.c index dd8fa5909..1ced47178 100644 --- a/src/spicelib/parser/inp2s.c +++ b/src/spicelib/parser/inp2s.c @@ -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) { diff --git a/src/spicelib/parser/inp2u.c b/src/spicelib/parser/inp2u.c index 93db3900c..34a907bc7 100644 --- a/src/spicelib/parser/inp2u.c +++ b/src/spicelib/parser/inp2u.c @@ -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) { diff --git a/src/spicelib/parser/inp2w.c b/src/spicelib/parser/inp2w.c index 69d2f9b46..937ed454f 100644 --- a/src/spicelib/parser/inp2w.c +++ b/src/spicelib/parser/inp2w.c @@ -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) { diff --git a/src/spicelib/parser/inp2y.c b/src/spicelib/parser/inp2y.c index c47d65759..f31abed7d 100644 --- a/src/spicelib/parser/inp2y.c +++ b/src/spicelib/parser/inp2y.c @@ -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); diff --git a/src/spicelib/parser/inp2z.c b/src/spicelib/parser/inp2z.c index 881a75720..99ad7df9d 100644 --- a/src/spicelib/parser/inp2z.c +++ b/src/spicelib/parser/inp2z.c @@ -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) { diff --git a/src/spicelib/parser/inpdomod.c b/src/spicelib/parser/inpdomod.c index 5c7815809..a45f360d9 100644 --- a/src/spicelib/parser/inpdomod.c +++ b/src/spicelib/parser/inpdomod.c @@ -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 */ diff --git a/src/spicelib/parser/inpgmod.c b/src/spicelib/parser/inpgmod.c index 60d33b9c9..9ec2e27da 100644 --- a/src/spicelib/parser/inpgmod.c +++ b/src/spicelib/parser/inpgmod.c @@ -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) {