From c198f878d3b7f89e934a04558b3168289ffe6711 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Tue, 9 Aug 2016 18:31:16 +0200 Subject: [PATCH] inpcom.c, bug fix in inp_chk_for_multi_in_vcvs() --- src/frontend/inpcom.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 00f7311be..349ddcf82 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1215,10 +1215,11 @@ inp_chk_for_multi_in_vcvs(struct line *c, int *line_number) char *fcn_b; - if ((fcn_b = strstr(line, "nand(")) != NULL || - (fcn_b = strstr(line, "and(")) != NULL || - (fcn_b = strstr(line, "nor(")) != NULL || - (fcn_b = strstr(line, "or(")) != NULL) + if (((fcn_b = strstr(line, "nand(")) != NULL || + (fcn_b = strstr(line, "and(")) != NULL || + (fcn_b = strstr(line, "nor(")) != NULL || + (fcn_b = strstr(line, "or(")) != NULL) && + isspace_c(fcn_b[-1])) { struct line *a_card, *model_card, *next_card; char keep, *comma_ptr, *xy_values1[5], *xy_values2[5]; @@ -1228,6 +1229,19 @@ inp_chk_for_multi_in_vcvs(struct line *c, int *line_number) int xy_count1, xy_count2; bool ok = FALSE; +#ifndef XSPICE + fprintf(stderr, + "\n" + "Error: XSPICE is required to run the 'multi-input pwl' option in line %d\n" + " %s\n" + "\n" + "See manual chapt. 31 for installation instructions\n", + *line_number, + line + ); + controlled_exit(EXIT_BAD); +#endif + do { ref_e = skip_non_ws(line);