Enable strings as parameters across subckt boundaries
by keeping the quotes and excluding {} around the string token.
This commit is contained in:
parent
07994ff225
commit
2db9533380
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 == '{') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue