Make casewriters keep track of the number of `union value's in each
authorBen Pfaff <blp@gnu.org>
Mon, 13 Aug 2007 00:41:34 +0000 (00:41 +0000)
committerBen Pfaff <blp@gnu.org>
Mon, 13 Aug 2007 00:41:34 +0000 (00:41 +0000)
commit130ced32165dc409b1be560d3d7a581a7ba3c5ee
treedee75b18ce0600ea021fd22c03e32257d6aeb395
parent6b40f1315cf46ca2417c10ce08bcf62941bdd305
Make casewriters keep track of the number of `union value's in each
case.  This is useful for two reasons: casewriter_write can then check
that the case being written is large enough, and later recipients of
the casewriter can determine the size of the case.

* get.c (case_map_get_value_cnt): New function.

* casewriter-translator.c (casewriter_create_translator): Add
value_cnt parameter.

* casewriter.c (struct casewriter): Add value_cnt member.
(casewriter_write): Check that the case passed in is big enough.
(casewriter_get_value_cnt): New function.
(casewriter_create): Add value_cnt parameter.
src/data/ChangeLog
src/data/casewriter-provider.h
src/data/casewriter-translator.c
src/data/casewriter.c
src/data/casewriter.h
src/data/por-file-writer.c
src/data/scratch-writer.c
src/data/sys-file-writer.c
src/language/data-io/ChangeLog
src/language/data-io/get.c
src/math/sort.c