casereader: Factor buffering shim out into separate source file.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 2 Mar 2010 06:12:48 +0000 (22:12 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 2 Mar 2010 06:12:48 +0000 (22:12 -0800)
commit0fbcb6682003e6deb5f517c4d54bada0301a61a1
tree64ea5aa6d45c8b372d625bbe829fb21b317ba7d6
parentc46ed75ddc47e79189b616d173fad98113a27357
casereader: Factor buffering shim out into separate source file.

This moves the "shim" code out of casereader.c into a separate
casereader-shim.[ch] in preparation for using it from procedure.c.

This commit also adds an optimization: if the shim reads all of the
subreader, then it closes the subreader immediately, instead of waiting
for the shim itself to be destroyed. This can allow resources to be freed
earlier.

This commit also adds a new function casereader_shim_slurp().  This
function will be used for the first time in the following commit.
src/data/automake.mk
src/data/casereader-shim.c [new file with mode: 0644]
src/data/casereader-shim.h [new file with mode: 0644]
src/data/casereader.c