From 734cb94b013af3e1f1132fb81aa9f7043520ec09 Mon Sep 17 00:00:00 2001 From: Meisam Bahadori Date: Sun, 16 Aug 2026 12:08:33 +0200 Subject: [PATCH] pa-163 --- src/frontend/inp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/frontend/inp.c b/src/frontend/inp.c index 310b71b48..40c71ec84 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -786,6 +786,23 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) controls = wl_cons(copy(skip_ws(dd->line) + 1), controls); ld->nextcard = dd->nextcard; line_free(dd, FALSE); + } else if (!commands && + ((ciprefix(".qpss", dd->line) && + (dd->line[5] == '\0' || isspace_c(dd->line[5]))) || + (ciprefix(".hbosc", dd->line) && + (dd->line[6] == '\0' || isspace_c(dd->line[6]))) || + (ciprefix(".phasenoise", dd->line) && + (dd->line[11] == '\0' || isspace_c(dd->line[11]))))) { + /* Enhancement-163: the rest of the harmonic-balance family as + * command-style dot-cards, mirroring `.hb` (Enhancement-162) and + * `.sweep` (Enhancement-146): a top-level `.qpss` / `.hbosc` / + * `.phasenoise` is stripped of its leading '.' and run after the + * circuit is parsed as the corresponding command. Each boundary + * check keeps the card from swallowing a longer name (e.g. `.hbosc` + * is not matched by the `.hb` branch above). */ + controls = wl_cons(copy(skip_ws(dd->line) + 1), controls); + ld->nextcard = dd->nextcard; + line_free(dd, FALSE); } else if (commands || prefix("*#", dd->line)) { s = dd->line;