diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index aa9d8e1f8..f0920228c 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -3304,7 +3304,12 @@ void inp_casefix(char *string) tmpstr = strstr(string, "file=\""); #endif - keepquotes = ciprefix(".param", string); // Allow string params + /* Allow string params */ + keepquotes = ciprefix(".param", string); + /* Allow string param in .subckt lines */ + keepquotes = keepquotes || (ciprefix(".subckt", string) && (strstr(string, "=\""))); + /* Keep quoted strings in X lines */ + keepquotes = keepquotes || (*string == 'x' && strchr(string, '\"')); while (*string) { #ifdef XSPICE @@ -3914,7 +3919,8 @@ static int inp_get_params( *end = '\0'; if (*value == '{' || isdigit_c(*value) || - (*value == '.' && isdigit_c(value[1]))) { + (*value == '.' && isdigit_c(value[1])) || + (*value == '\"')) { value = copy(value); } else { diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index c1bb96208..ad0620983 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -1623,8 +1623,8 @@ nupa_subcktcall(dico_t *dico, const char *s, const char *x, char *kp = jp; ds_clear(&ustr); - if (alfanum(*kp) || *kp == '.') { - /* number, identifier */ + if (alfanum(*kp) || *kp == '.' || *kp == '\"') { + /* number, identifier, string */ jp = skip_non_ws(kp); pscopy(&ustr, kp, jp); } else if (*kp == '{') {