Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/* ------ some useful functions ------ */
-static void skip_spaces(char **s)
+static char *skip_spaces(char *p)
{
- char *p = *s;
-
while (1) {
if (*p == '\\' && p[1] == '\n') {
p++;
}
p++;
}
- *s = p;
+ return p;
}
/* returns old *s, advances *s past word and terminating NUL */
if (s && *s) {
v->number = my_strtod(&s);
if (v->type & VF_USER) {
- skip_spaces(&s);
+ s = skip_spaces(s);
if (*s != '\0')
v->type &= ~VF_USER;
}
} else {
p = g_pos;
readnext:
- skip_spaces(&p);
+ p = skip_spaces(p);
g_lineno = t_lineno;
if (*p == '#')
while (*p != '\n' && *p != '\0')
tc = TC_VARIABLE;
/* also consume whitespace between functionname and bracket */
if (!(expected & TC_VARIABLE) || (expected & TC_ARRAY))
- skip_spaces(&p);
+ p = skip_spaces(p);
if (*p == '(') {
tc = TC_FUNCTION;
} else {