From d534a56d95bca7bdd812be024d9eacba4734e2b7 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 9 Nov 2012 17:20:11 +0000 Subject: Many changes: tabconv'd the C++ code, added a license, BSD, and docs. --- c++-libbu++/src/tests/dump.cpp | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) (limited to 'c++-libbu++/src/tests/dump.cpp') diff --git a/c++-libbu++/src/tests/dump.cpp b/c++-libbu++/src/tests/dump.cpp index e0dcb52..f1950b2 100644 --- a/c++-libbu++/src/tests/dump.cpp +++ b/c++-libbu++/src/tests/dump.cpp @@ -1,3 +1,10 @@ +/* + * Copyright (C) 2007-2012 Xagasoft, All rights reserved. + * + * This file is part of the libgats library and is released under the + * terms of the license contained in the file LICENSE. + */ + #include #include #include @@ -7,24 +14,24 @@ using namespace Bu; int main( int argc, char *argv[] ) { - File fIn( argv[1], File::Read ); - Gats::GatsStream gsIn( fIn ); + File fIn( argv[1], File::Read ); + Gats::GatsStream gsIn( fIn ); - for(;;) - { - sio << "Reading from file position: " << fIn.tell() << sio.nl; - Gats::Object *pObj = gsIn.readObject(); - if( !pObj ) - { - if( gsIn.hasReadBuffer() ) - { - sio << "Premature end of stream detected, have " - << gsIn.getReadBufferSize() << "b." << sio.nl; - } - return 0; - } + for(;;) + { + sio << "Reading from file position: " << fIn.tell() << sio.nl; + Gats::Object *pObj = gsIn.readObject(); + if( !pObj ) + { + if( gsIn.hasReadBuffer() ) + { + sio << "Premature end of stream detected, have " + << gsIn.getReadBufferSize() << "b." << sio.nl; + } + return 0; + } - sio << *pObj << sio.nl; - } + sio << *pObj << sio.nl; + } } -- cgit v1.2.3