diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 05:30:43 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 05:30:43 +0000 |
commit | 7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2 (patch) | |
tree | e2d4bfccd81070adf7294ee54db2399df0c7171f /src/base64.cpp | |
parent | f5aca1a1b402bd7ebc944dc6e6fe65828d863365 (diff) | |
download | libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.gz libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.bz2 libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.tar.xz libbu++-7c6c9538b03c9eae24e38fbeb30dd76a16aff1d2.zip |
Wow, got the Stream changes propegated, all tests build with string instead of
fstring, and updated the copyright notice to extend to 2011
Diffstat (limited to '')
-rw-r--r-- | src/base64.cpp | 14 |
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 | ||
67 | size_t Bu::Base64::stop() | 67 | Bu::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 | ||
92 | size_t Bu::Base64::read( void *pBuf, size_t nBytes ) | 92 | Bu::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 | ||
156 | size_t Bu::Base64::write( const void *pBuf, size_t nBytes ) | 156 | Bu::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 ) |