lib: use stream state instead of eof() to determine end of stream
commitf708a822304851500ac41d666535ae74871d2159
authorChris Frey <cdfrey@foursquare.net>
Wed, 8 Dec 2010 03:06:19 +0000 (7 22:06 -0500)
committerChris Frey <cdfrey@foursquare.net>
Thu, 9 Dec 2010 19:59:43 +0000 (9 14:59 -0500)
tree818bca397bd3f5f49df629c8b7069e49e3cd85c0
parent1f3648ede59c636f00656cb5da3914fcc1db90d3
lib: use stream state instead of eof() to determine end of stream

Using while(!eof()) on a C++ stream means it may never end if the stream
enters an error state.

See:
http://stackoverflow.com/questions/485230/c-tokenizing-using-iterators-in-an-eof-cycle
src/a_codsection.cc