2011-05-09 19:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/memofile.c
! enabled EOF char on *nix platforms
* src/rtl/base64d.c
* uppercase hex nums to be in sync with base64c.c
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-05-09 19:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/memofile.c
|
||||
! enabled EOF char on *nix platforms
|
||||
|
||||
* src/rtl/base64d.c
|
||||
* uppercase hex nums to be in sync with base64c.c
|
||||
|
||||
2011-05-09 18:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* examples/httpsrv/uhttpd.prg
|
||||
* examples/httpsrv/cookie.prg
|
||||
@@ -35,7 +42,7 @@
|
||||
MEMOWRITE() is disabled by default - IMHO it's wrong
|
||||
because it's not possible to use these functions to exchange
|
||||
safely data with CA-Cl*pper applications or even DOS/Windows
|
||||
versions of Harbour applications.
|
||||
versions of Harbour applications. [DONE]
|
||||
|
||||
* harbour/src/rtl/hbcom.c
|
||||
* replaced infinite waiting for reading/writing from/to serial port
|
||||
|
||||
@@ -90,7 +90,7 @@ static HB_SIZE base64_decode_block( const char * code_in, const HB_SIZE length_i
|
||||
fragment = base64_decode_value( *codechar++ );
|
||||
}
|
||||
while( fragment < 0 );
|
||||
*pszPlainchar = ( fragment & 0x03f ) << 2;
|
||||
*pszPlainchar = ( fragment & 0x03F ) << 2;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -100,7 +100,7 @@ static HB_SIZE base64_decode_block( const char * code_in, const HB_SIZE length_i
|
||||
}
|
||||
while( fragment < 0 );
|
||||
*pszPlainchar++ |= ( fragment & 0x030 ) >> 4;
|
||||
*pszPlainchar = ( fragment & 0x00f ) << 4;
|
||||
*pszPlainchar = ( fragment & 0x00F ) << 4;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -109,7 +109,7 @@ static HB_SIZE base64_decode_block( const char * code_in, const HB_SIZE length_i
|
||||
fragment = base64_decode_value( *codechar++ );
|
||||
}
|
||||
while( fragment < 0 );
|
||||
*pszPlainchar++ |= ( fragment & 0x03c ) >> 2;
|
||||
*pszPlainchar++ |= ( fragment & 0x03C ) >> 2;
|
||||
*pszPlainchar = ( fragment & 0x003 ) << 6;
|
||||
|
||||
do
|
||||
@@ -119,7 +119,7 @@ static HB_SIZE base64_decode_block( const char * code_in, const HB_SIZE length_i
|
||||
fragment = base64_decode_value( *codechar++ );
|
||||
}
|
||||
while( fragment < 0 );
|
||||
*pszPlainchar++ |= ( fragment & 0x03f );
|
||||
*pszPlainchar++ |= ( fragment & 0x03F );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,15 +78,11 @@ static void hb_memoread( HB_BOOL bHandleEOF )
|
||||
nSize = hb_fsReadLarge( fhnd, pbyBuffer, nSize );
|
||||
|
||||
/* Don't read the file terminating EOF character */
|
||||
#if ! defined( HB_OS_UNIX )
|
||||
if( bHandleEOF && nSize > 0 )
|
||||
{
|
||||
if( pbyBuffer[ nSize - 1 ] == HB_CHAR_EOF )
|
||||
--nSize;
|
||||
}
|
||||
#else
|
||||
HB_SYMBOL_UNUSED( bHandleEOF );
|
||||
#endif
|
||||
|
||||
hb_retclen_buffer( pbyBuffer, nSize );
|
||||
}
|
||||
@@ -130,15 +126,11 @@ static HB_BOOL hb_memowrit( HB_BOOL bHandleEOF )
|
||||
|
||||
/* NOTE: CA-Cl*pper will add the EOF even if the write failed. [vszakats] */
|
||||
/* NOTE: CA-Cl*pper will not return .F. when the EOF could not be written. [vszakats] */
|
||||
#if ! defined( HB_OS_UNIX )
|
||||
if( bHandleEOF && bRetVal ) /* if true, then write EOF */
|
||||
{
|
||||
char cEOF = HB_CHAR_EOF;
|
||||
hb_fsWrite( fhnd, &cEOF, sizeof( char ) );
|
||||
}
|
||||
#else
|
||||
HB_SYMBOL_UNUSED( bHandleEOF );
|
||||
#endif
|
||||
|
||||
hb_fsClose( fhnd );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user