From c033298db9edf236f016b3b8eb8f266f8e111f6f Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 12 Jun 2021 12:01:28 +0200 Subject: [PATCH] Don't replace a device model name by a parameter, if both have the same names. This is an extension to commit 7706889a0 ("inpcom.c, fix bug no 384 do not quote fourth token in f, h lines otherwise if dev name equals param name parsing fails", 2018-12-08) Fixes bug 327 reported by T. Edwards at https://github.com/google/skywater-pdk/issues/327 --- src/frontend/inpcom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 1419b1cb6..6950033c8 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -7196,8 +7196,9 @@ static void inp_quote_params(struct card *c, struct card *end_c, continue; /* There are devices that should not get quotes around tokens - following after the terminals. See bug 384 */ - if (curr_line[0] == 'f' || curr_line[0] == 'h') + following after the terminals. These may be model names or control + voltages. See bug 384 or Skywater issue 327 */ + if (strchr("fhmouydqjz", *curr_line)) num_terminals++; for (i = 0; i < num_params; i++) {