Fix bug #21192. Thanks to John Darrington for review.
authorBen Pfaff <blp@gnu.org>
Tue, 2 Oct 2007 04:13:07 +0000 (04:13 +0000)
committerBen Pfaff <blp@gnu.org>
Tue, 2 Oct 2007 04:13:07 +0000 (04:13 +0000)
commit83ad8f5b760cb46bd1d86f60a40d6aace21118ef
treee53a65727c1277688ea2aac784c07c6e7d0c8a61
parent4dc92d7d1ff3368b21a6cac5a4a41fcd4bb81ce4
Fix bug #21192.  Thanks to John Darrington for review.

* casereader.c (casereader_read): Decrement case_cnt before
calling the casereader's "read" member function, so that we
interact properly with lazy_casereader.

* datasheet.c: Add regression test for above bug fix.
(clone_datasheet): New function.
(lazy_callback): New function.
(check_datasheet_casereader): New function.
(check_datasheet): Check datasheet contents are reported correctly
through an ordinary casereader and a lazy casereader.
(clone_model): Use clone_datasheet.
src/data/ChangeLog
src/data/casereader.c
src/data/datasheet.c