Patch to allow (and ignore) leading or trailing commas
when putting {} around tokens. Tested with PWL voltage source.
Patch has been suggested by Liqian Zhang
This commit is contained in:
parent
33571877dc
commit
9221df234c
|
|
@ -4884,10 +4884,10 @@ char *ya_search_identifier(char *str, const char *identifier, char *str_begin)
|
||||||
before = '\0';
|
before = '\0';
|
||||||
|
|
||||||
if (is_arith_char(before) || isspace_c(before) ||
|
if (is_arith_char(before) || isspace_c(before) ||
|
||||||
(str <= str_begin)) {
|
before == ',' || (str <= str_begin)) {
|
||||||
char after = str[strlen(identifier)];
|
char after = str[strlen(identifier)];
|
||||||
if ((is_arith_char(after) || isspace_c(after) ||
|
if (is_arith_char(after) || isspace_c(after) ||
|
||||||
after == '\0'))
|
after == '\0' || after == ',')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7258,8 +7258,8 @@ static void inp_quote_params(struct card *c, struct card *end_c,
|
||||||
|
|
||||||
char *rest = s + strlen(deps[i].param_name);
|
char *rest = s + strlen(deps[i].param_name);
|
||||||
|
|
||||||
if (s > curr_line && (isspace_c(s[-1]) || s[-1] == '=') &&
|
if (s > curr_line && (isspace_c(s[-1]) || s[-1] == '=' || s[-1] == ',') &&
|
||||||
(isspace_c(*rest) || *rest == '\0' || *rest == ')')) {
|
(isspace_c(*rest) || *rest == '\0' || *rest == ',' || *rest == ')')) {
|
||||||
int prefix_len;
|
int prefix_len;
|
||||||
|
|
||||||
if (isspace_c(s[-1])) {
|
if (isspace_c(s[-1])) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue