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/utf.cpp | 112 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'src/tests/utf.cpp') diff --git a/src/tests/utf.cpp b/src/tests/utf.cpp index 923b611..40d4194 100644 --- a/src/tests/utf.cpp +++ b/src/tests/utf.cpp @@ -7,65 +7,65 @@ using namespace Bu; int main() { - sio << "Code: " << Bu::__calcHashCode( Bu::UtfString("Hello there") ) - << sio.nl; + sio << "Code: " << Bu::__calcHashCode( Bu::UtfString("Hello there") ) + << sio.nl; - Bu::File fIn("utf8.in", Bu::File::Read ); - Bu::String sUtf8; - char buf[4096]; - while( !fIn.isEos() ) - { - int iAmnt = fIn.read( buf, 4096 ); - sUtf8.append( buf, iAmnt ); - } - Bu::UtfString us( sUtf8, Bu::UtfString::Utf8 ); - us.debug(); - { - Bu::File fOut("utf8.out", Bu::File::WriteNew ); - us.write( fOut, Bu::UtfString::Utf8 ); - } - { - Bu::File fOut("utf16.out", Bu::File::WriteNew ); - us.write( fOut, Bu::UtfString::Utf16 ); - } - { - Bu::File fOut("utf16le.out", Bu::File::WriteNew ); - us.write( fOut, Bu::UtfString::Utf16le ); - } - { - Bu::File fOut("utf16be.out", Bu::File::WriteNew ); - us.write( fOut, Bu::UtfString::Utf16be ); - } - { - Bu::File fOut("utf32.out", Bu::File::WriteNew ); - us.write( fOut, Bu::UtfString::Utf32 ); - } - { - Bu::File fOut("utf32le.out", Bu::File::WriteNew ); - us.write( fOut, Bu::UtfString::Utf32le ); - } - { - Bu::File fOut("utf32be.out", Bu::File::WriteNew ); - us.write( fOut, Bu::UtfString::Utf32be ); - } + Bu::File fIn("utf8.in", Bu::File::Read ); + Bu::String sUtf8; + char buf[4096]; + while( !fIn.isEos() ) + { + int iAmnt = fIn.read( buf, 4096 ); + sUtf8.append( buf, iAmnt ); + } + Bu::UtfString us( sUtf8, Bu::UtfString::Utf8 ); + us.debug(); + { + Bu::File fOut("utf8.out", Bu::File::WriteNew ); + us.write( fOut, Bu::UtfString::Utf8 ); + } + { + Bu::File fOut("utf16.out", Bu::File::WriteNew ); + us.write( fOut, Bu::UtfString::Utf16 ); + } + { + Bu::File fOut("utf16le.out", Bu::File::WriteNew ); + us.write( fOut, Bu::UtfString::Utf16le ); + } + { + Bu::File fOut("utf16be.out", Bu::File::WriteNew ); + us.write( fOut, Bu::UtfString::Utf16be ); + } + { + Bu::File fOut("utf32.out", Bu::File::WriteNew ); + us.write( fOut, Bu::UtfString::Utf32 ); + } + { + Bu::File fOut("utf32le.out", Bu::File::WriteNew ); + us.write( fOut, Bu::UtfString::Utf32le ); + } + { + Bu::File fOut("utf32be.out", Bu::File::WriteNew ); + us.write( fOut, Bu::UtfString::Utf32be ); + } - /* - argc--, argv++; + /* + argc--, argv++; - for( char **sFile = argv; *sFile; sFile++ ) - { - Bu::File fIn( *sFile, Bu::File::Read ); - Bu::String sUtf8; - char buf[4096]; - while( !fIn.isEos() ) - { - int iAmnt = fIn.read( buf, 4096 ); - sUtf8.append( buf, iAmnt ); - } - Bu::UtfString us( sUtf8, Bu::UtfString::Utf16 ); + for( char **sFile = argv; *sFile; sFile++ ) + { + Bu::File fIn( *sFile, Bu::File::Read ); + Bu::String sUtf8; + char buf[4096]; + while( !fIn.isEos() ) + { + int iAmnt = fIn.read( buf, 4096 ); + sUtf8.append( buf, iAmnt ); + } + Bu::UtfString us( sUtf8, Bu::UtfString::Utf16 ); - us.debug(); - } - */ + us.debug(); + } + */ } -- cgit v1.2.3