}
}
+/* Parses and returns an expression of the given TYPE, as
+ expr_parse(), and sets up so that destroying POOL will free
+ the expression as well. */
+struct expression *
+expr_parse_pool (struct pool *pool,
+ struct dictionary *dict, enum expr_type type)
+{
+ struct expression *e = expr_parse (dict, type);
+ if (e != NULL)
+ pool_add_subpool (pool, e->expr_pool);
+ return e;
+}
+
/* Free expression E. */
void
expr_free (struct expression *e)
size_t name_len = strcspn (*name, ".");
if (test_len == name_len)
{
- if (mm_case_compare (*test, *name, test_len))
+ if (buf_compare_case (*test, *name, test_len))
return false;
}
else if (test_len < 3 || test_len > name_len)
return false;
else
{
- if (mm_case_compare (*test, *name, test_len))
+ if (buf_compare_case (*test, *name, test_len))
return false;
}
{
assert ((f->flags & OPF_MIN_VALID) == 0);
msg (SE, _("%s function does not accept a minimum valid "
- "argument count."));
+ "argument count."), f->prototype);
return false;
}
else
if (array_arg_cnt < f->array_min_elems)
{
msg (SE, _("%s requires at least %d valid arguments in list."),
- f->prototype);
+ f->prototype, f->array_min_elems);
return false;
}
else if (min_valid > array_arg_cnt)
if (token == T_ID && lex_look_ahead () == 'T')
{
struct variable **vars;
- int var_cnt;
- int i;
+ size_t var_cnt;
+ size_t i;
if (!parse_variables (default_dict, &vars, &var_cnt, PV_SINGLE))
goto fail;