This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Adds a new input file to case matcher CM.
case_matcher_match() will compare the variables specified in
/* Adds a new input file to case matcher CM.
case_matcher_match() will compare the variables specified in
All of the BY subcases provided to this function for a given
CM must be conformable (see subcase_conformable()). */
void
case_matcher_add_input (struct case_matcher *cm, const struct subcase *by,
All of the BY subcases provided to this function for a given
CM must be conformable (see subcase_conformable()). */
void
case_matcher_add_input (struct case_matcher *cm, const struct subcase *by,
- cm->by_values = xmalloc (subcase_get_n_values (by)
- * sizeof *cm->by_values);
+ {
+ cm->by_values = xmalloc (sizeof *cm->by_values
+ * subcase_get_n_fields (by));
+ caseproto_init_values (subcase_get_proto (by), cm->by_values);
+ }
- return subcase_compare_3way (&a->by_vars, a->data, &b->by_vars, b->data);
+ return subcase_compare_3way (&a->by_vars, *a->data, &b->by_vars, *b->data);