From 44425b1d0a5a4922c9079ba35502de8b79c99106 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 2 May 2015 12:20:58 +0200 Subject: [PATCH] fix commit "inpcom.c, comment_out_unused_subckt_models() #4/8, introduce `nlist_find()'" which broke the search for binned models --- src/frontend/inpcom.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 5f3bb6347..4750da716 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1630,6 +1630,17 @@ nlist_find(const struct nlist *nlist, const char *name) } +static const char * +nlist_model_find(const struct nlist *nlist, const char *name) +{ + int i; + for (i = 0; i < nlist->num_names; i++) + if (model_name_match(nlist->names[i], name)) + return nlist->names[i]; + return NULL; +} + + static void nlist_adjoin(struct nlist *nlist, char *name) { @@ -1842,7 +1853,7 @@ comment_out_unused_subckt_models(struct line *start_card) if (!cieq(model_type, "c") && !cieq(model_type, "l") && !cieq(model_type, "r") && - !nlist_find(used_models, model_name)) + !nlist_model_find(used_models, model_name)) { *line = '*'; }