aboutsummaryrefslogtreecommitdiff
path: root/src/base64.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
commit393f1b414746a7f1977971dd7659dd2b47092b11 (patch)
tree81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/base64.cpp
parentc259f95bd0e58b247940a339bb9b4b401b4e9438 (diff)
parent7e25a863325dc3e9762397e700030969e093b087 (diff)
downloadlibbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically update your projects.
Diffstat (limited to '')
-rw-r--r--src/base64.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/base64.cpp b/src/base64.cpp
index 73ec8f3..18a18e5 100644
--- a/src/base64.cpp
+++ b/src/base64.cpp
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved. 2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 * 3 *
4 * This file is part of the libbu++ library and is released under the 4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
@@ -64,7 +64,7 @@ void Bu::Base64::start()
64{ 64{
65} 65}
66 66
67size_t Bu::Base64::stop() 67Bu::size Bu::Base64::stop()
68{ 68{
69// if( eMode |= Encode ) 69// if( eMode |= Encode )
70 { 70 {
@@ -89,11 +89,11 @@ size_t Bu::Base64::stop()
89// } 89// }
90} 90}
91 91
92size_t Bu::Base64::read( void *pBuf, size_t nBytes ) 92Bu::size Bu::Base64::read( void *pBuf, Bu::size nBytes )
93{ 93{
94 if( bEosIn == true && iRPos == iChars ) 94 if( bEosIn == true && iRPos == iChars )
95 return 0; 95 return 0;
96 size_t sIn = 0; 96 Bu::size sIn = 0;
97 char buf[4]; 97 char buf[4];
98 while( sIn < nBytes ) 98 while( sIn < nBytes )
99 { 99 {
@@ -153,11 +153,11 @@ size_t Bu::Base64::read( void *pBuf, size_t nBytes )
153 return sIn; 153 return sIn;
154} 154}
155 155
156size_t Bu::Base64::write( const void *pBuf, size_t nBytes ) 156Bu::size Bu::Base64::write( const void *pBuf, Bu::size nBytes )
157{ 157{
158 size_t sOut = 0; 158 Bu::size sOut = 0;
159 char outBuf[4]; 159 char outBuf[4];
160 for( size_t j = 0; j < nBytes; j++ ) 160 for( Bu::size j = 0; j < nBytes; j++ )
161 { 161 {
162 iBuf |= (((uint8_t *)pBuf)[j])<<((2-iBPos++)*8); 162 iBuf |= (((uint8_t *)pBuf)[j])<<((2-iBPos++)*8);
163 if( iBPos == 3 ) 163 if( iBPos == 3 )