701 |
} |
} |
702 |
} |
} |
703 |
|
|
704 |
|
/* Copies values from SRC, which represents a case arranged |
705 |
|
according to dictionary D, to DST, which represents a case |
706 |
|
arranged according to the dictionary that will be produced by |
707 |
|
dict_compact_values(D). */ |
708 |
|
void |
709 |
|
dict_compact_case (const struct dictionary *d, |
710 |
|
struct ccase *dst, const struct ccase *src) |
711 |
|
{ |
712 |
|
size_t i; |
713 |
|
size_t value_idx; |
714 |
|
|
715 |
|
value_idx = 0; |
716 |
|
for (i = 0; i < d->var_cnt; i++) |
717 |
|
{ |
718 |
|
struct variable *v = d->var[i]; |
719 |
|
|
720 |
|
if (dict_class_from_id (v->name) != DC_SCRATCH) |
721 |
|
{ |
722 |
|
case_copy (dst, value_idx, src, v->fv, v->nv); |
723 |
|
value_idx += v->nv; |
724 |
|
} |
725 |
|
} |
726 |
|
} |
727 |
|
|
728 |
/* Returns the number of values that would be used by a case if |
/* Returns the number of values that would be used by a case if |
729 |
dict_compact_values() were called. */ |
dict_compact_values() were called. */ |
730 |
size_t |
size_t |