From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/tests/base64.cpp | 126 +++++++++++++++++++++++++-------------------------- 1 file changed, 63 insertions(+), 63 deletions(-) (limited to 'src/tests/base64.cpp') diff --git a/src/tests/base64.cpp b/src/tests/base64.cpp index 1e1892d..640118a 100644 --- a/src/tests/base64.cpp +++ b/src/tests/base64.cpp @@ -11,73 +11,73 @@ int main( int argc, char *argv[] ) { - argc--,argv++; + argc--,argv++; - if( argc < 3 ) - return 0; + if( argc < 3 ) + return 0; - if( argv[0][0] == 'e' ) - { - argv++; - Bu::File fIn( argv[0], Bu::File::Read ); - Bu::File fOut( argv[1], Bu::File::WriteNew ); - Bu::Base64 bOut( fOut ); + if( argv[0][0] == 'e' ) + { + argv++; + Bu::File fIn( argv[0], Bu::File::Read ); + Bu::File fOut( argv[1], Bu::File::WriteNew ); + Bu::Base64 bOut( fOut ); - char buf[900]; - for(;;) - { - int iRead = fIn.read( buf, 900 ); - bOut.write( buf, iRead ); - if( iRead < 900 ) - break; - } - } - else if( argv[0][0] == 'd' ) - { - argv++; - Bu::File fIn( argv[0], Bu::File::Read ); - Bu::File fOut( argv[1], Bu::File::WriteNew ); - Bu::Base64 bIn( fIn ); + char buf[900]; + for(;;) + { + int iRead = fIn.read( buf, 900 ); + bOut.write( buf, iRead ); + if( iRead < 900 ) + break; + } + } + else if( argv[0][0] == 'd' ) + { + argv++; + Bu::File fIn( argv[0], Bu::File::Read ); + Bu::File fOut( argv[1], Bu::File::WriteNew ); + Bu::Base64 bIn( fIn ); - char buf[1024]; - for(;;) - { - int iRead = bIn.read( buf, 1024 ); - printf("Read %d bytes.\n", iRead ); - fOut.write( buf, iRead ); - if( iRead == 0 ) - break; - } - } - else if( argv[0][0] == 'D' ) - { - argv++; - Bu::MemBuf mIn; - { - Bu::File fIn( argv[0], Bu::File::Read ); - char buf[1024]; - for(;;) - { - int iRead = fIn.read( buf, 1024 ); - mIn.write( buf, iRead ); - if( iRead < 1024 ) - break; - } - mIn.setPos( 0 ); - } - Bu::File fOut( argv[1], Bu::File::WriteNew ); - Bu::Base64 bIn( mIn ); + char buf[1024]; + for(;;) + { + int iRead = bIn.read( buf, 1024 ); + printf("Read %d bytes.\n", iRead ); + fOut.write( buf, iRead ); + if( iRead == 0 ) + break; + } + } + else if( argv[0][0] == 'D' ) + { + argv++; + Bu::MemBuf mIn; + { + Bu::File fIn( argv[0], Bu::File::Read ); + char buf[1024]; + for(;;) + { + int iRead = fIn.read( buf, 1024 ); + mIn.write( buf, iRead ); + if( iRead < 1024 ) + break; + } + mIn.setPos( 0 ); + } + Bu::File fOut( argv[1], Bu::File::WriteNew ); + Bu::Base64 bIn( mIn ); - char buf[1024]; - for(;;) - { - int iRead = bIn.read( buf, 1024 ); - printf("Read %d bytes.\n", iRead ); - fOut.write( buf, iRead ); - if( iRead == 0 ) - break; - } - } + char buf[1024]; + for(;;) + { + int iRead = bIn.read( buf, 1024 ); + printf("Read %d bytes.\n", iRead ); + fOut.write( buf, iRead ); + if( iRead == 0 ) + break; + } + } - return 0; + return 0; } -- cgit v1.2.3