inpcom.c, cleanup `inp_quote_params()', use `skip_ws()'
This commit is contained in:
parent
7a2dfd46eb
commit
6a6c9a9409
|
|
@ -6116,21 +6116,19 @@ inp_quote_params(struct line *s_c, struct line *e_c, struct dependency *deps, in
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((str_ptr = ya_search_identifier(str_ptr, deps[i].param_name, curr_line)) != NULL) {
|
while ((str_ptr = ya_search_identifier(str_ptr, deps[i].param_name, curr_line)) != NULL) {
|
||||||
beg = str_ptr - 1;
|
beg = str_ptr;
|
||||||
end = str_ptr + strlen(deps[i].param_name);
|
end = str_ptr + strlen(deps[i].param_name);
|
||||||
if ((isspace(*beg) || *beg == '=') &&
|
if ((isspace(beg[-1]) || beg[-1] == '=') &&
|
||||||
(isspace(*end) || *end == '\0' || *end == ')')) {
|
(isspace(*end) || *end == '\0' || *end == ')')) {
|
||||||
if (isspace(*beg)) {
|
if (isspace(beg[-1])) {
|
||||||
while (isspace(*beg))
|
beg = skip_back_ws(beg);
|
||||||
|
if (beg[-1] == '{')
|
||||||
beg--;
|
beg--;
|
||||||
if (*beg != '{')
|
|
||||||
beg++;
|
|
||||||
str_ptr = beg;
|
str_ptr = beg;
|
||||||
}
|
}
|
||||||
if (isspace(*end)) {
|
if (isspace(*end)) {
|
||||||
/* possible case: "{ length }" -> {length} */
|
/* possible case: "{ length }" -> {length} */
|
||||||
while (*end && isspace(*end))
|
end = skip_ws(end);
|
||||||
end++;
|
|
||||||
if (*end == '}')
|
if (*end == '}')
|
||||||
end++;
|
end++;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue