782 |
static int |
static int |
783 |
equal_splits (const struct ccase *a, const struct ccase *b) |
equal_splits (const struct ccase *a, const struct ccase *b) |
784 |
{ |
{ |
785 |
struct variable *const *split; |
return case_compare (a, b, |
786 |
size_t split_cnt; |
dict_get_split_vars (default_dict), |
787 |
size_t i; |
dict_get_split_cnt (default_dict)) == 0; |
|
|
|
|
split = dict_get_split_vars (default_dict); |
|
|
split_cnt = dict_get_split_cnt (default_dict); |
|
|
for (i = 0; i < split_cnt; i++) |
|
|
{ |
|
|
struct variable *v = split[i]; |
|
|
|
|
|
switch (v->type) |
|
|
{ |
|
|
case NUMERIC: |
|
|
if (case_num (a, v->fv) != case_num (b, v->fv)) |
|
|
return 0; |
|
|
break; |
|
|
case ALPHA: |
|
|
if (memcmp (case_str (a, v->fv), case_str (b, v->fv), v->width)) |
|
|
return 0; |
|
|
break; |
|
|
default: |
|
|
assert (0); |
|
|
} |
|
|
} |
|
|
|
|
|
return 1; |
|
788 |
} |
} |
789 |
|
|
790 |
/* Dumps out the values of all the split variables for the case C. */ |
/* Dumps out the values of all the split variables for the case C. */ |