2015-09-01 15:07 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* ChangeLog.txt
    ! fixed typo in ChangeLog entry. I used hb_socketNew() instead of
      hb_socketSetFilter()

  * include/hbapifs.h
  * src/rtl/filebuf.c
    + added helper C function:
         HB_SIZE hb_fileResult( HB_SIZE nSize );
      It converts ( HB_SIZE ) FS_ERROR to 0 so it can be used to wrap
      hb_fileRead()/hb_fileWrite() to force previous results.

  * src/rdd/dbffpt/dbffpt1.c
    * reduced variable scope

  * src/rtl/copyfile.c
    ! fixed typo in last commit - thanks to Viktor.
This commit is contained in:
Przemysław Czerpak
2015-09-01 15:07:03 +02:00
parent 310e2134bd
commit 9a9128ea27
5 changed files with 31 additions and 8 deletions

View File

@@ -10,6 +10,24 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2015-09-01 15:07 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
! fixed typo in ChangeLog entry. I used hb_socketNew() instead of
hb_socketSetFilter()
* include/hbapifs.h
* src/rtl/filebuf.c
+ added helper C function:
HB_SIZE hb_fileResult( HB_SIZE nSize );
It converts ( HB_SIZE ) FS_ERROR to 0 so it can be used to wrap
hb_fileRead()/hb_fileWrite() to force previous results.
* src/rdd/dbffpt/dbffpt1.c
* reduced variable scope
* src/rtl/copyfile.c
! fixed typo in last commit - thanks to Viktor.
2015-08-31 23:48 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbnetio/netiosrv.c
! removed unnecessary casting (c&p typo)
@@ -210,7 +228,7 @@
ZNET filter always disables any other filters and operates on raw
socket.
Please remember that it's optional module. If programmer does not
use hb_socketNewZNet() explicitly and prefers using hb_socketNew()
use hb_socketNewZNet() explicitly and prefers using hb_socketSetFilter()
then he should force linking this module by REQUEST hb_socketNewZNet
+ added fSync parameter to hb_znetFlush()
@@ -226,7 +244,7 @@
ZSOCK socket filter can be created by new PRG functions:
hb_socketNewZSock( <pSocket>, [<hParams>] ) -> <pSocket> | NIL
or by standard socket API with "ZSOCK" as filter name.
Programmers using hb_socketNew() can force linking this module by
Programmers using hb_socketSetFilter() can force linking this module by
REQUEST hb_socketNewZSock
ZSOCK filter can be used with other filters.
ZSOCK filter recognize the following settings in initialization
@@ -252,7 +270,7 @@
BFSOCK socket filter can be created by new PRG functions:
hb_socketNewBFSock( <pSocket>, [<hParams>] ) -> <pSocket> | NIL
or by standard socket API with "BFSOCK" as filter name.
Programmers using hb_socketNew() can force linking this module by
Programmers using hb_socketSetFilter() can force linking this module by
REQUEST hb_socketNewBFSock
BFSOCK filter can be used with other filters, i.e. with ZSOCK.
Please only remember that good encryption algorithms have to
@@ -277,7 +295,7 @@
hb_socketNewSSL_accept( <pSocket>, <pSSL> [, <nTimeout> ] )
-> <pSocketSSL> | NIL
or by standard socket API with "SSL" as filter name.
Programmers using hb_socketNew() can force linking this module by
Programmers using hb_socketSetFilter() can force linking this module by
REQUEST hb_socketNewSSL_connect
or
REQUEST hb_socketNewSSL_accept

View File

@@ -416,6 +416,7 @@ extern HB_EXPORT PHB_FILE hb_fileFromHandle( HB_FHANDLE hFile );
extern HB_EXPORT HB_BOOL hb_fileDetach( PHB_FILE pFile );
extern HB_EXPORT HB_BOOL hb_fileIsLocal( PHB_FILE pFile );
extern HB_EXPORT HB_BOOL hb_fileIsLocalName( const char * pszFileName );
extern HB_EXPORT HB_SIZE hb_fileResult( HB_SIZE nSize );
/* interface to PRG level hb_vf*() file pointer items */
extern HB_EXPORT PHB_FILE hb_fileParam( int iParam );

View File

@@ -1001,11 +1001,11 @@ static HB_ULONG hb_fptGetMemoLen( FPTAREAP pArea, HB_USHORT uiIndex )
if( pArea->bMemoType == DB_MEMO_DBT )
{
HB_BYTE pBlock[ DBT_DEFBLOCKSIZE ];
HB_SIZE nLen, n;
HB_SIZE n;
do
{
nLen = hb_fileReadAt( pArea->pMemoFile, pBlock, DBT_DEFBLOCKSIZE, fOffset );
HB_SIZE nLen = hb_fileReadAt( pArea->pMemoFile, pBlock, DBT_DEFBLOCKSIZE, fOffset );
if( nLen == 0 || nLen == ( HB_SIZE ) FS_ERROR )
break;
fOffset += nLen;
@@ -2412,7 +2412,6 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, HB_BYTE ** pbMemoBuf, HB_B
char * pszStr = ( char * ) ( *pbMemoBuf );
*pbMemoBuf += ulLen;
if( iTrans == FPT_TRANS_UNICODE )
{
hb_itemPutStrLenU16( pItem, HB_CDP_ENDIAN_LITTLE,

View File

@@ -132,7 +132,7 @@ static HB_BOOL hb_copyfile( const char * pszSource, const char * pszDest )
while( nWritten < nRead )
{
HB_SIZE nDone = hb_fileWrite( pDest, buffer + nWritten, nRead - nWritten, -1 );
if( nDone > 0 )
if( nDone != ( HB_SIZE ) FS_ERROR )
nWritten += nDone;
if( nWritten < nRead )
{

View File

@@ -1482,3 +1482,8 @@ PHB_FILE hb_filePOpen( const char * pszFileName, const char * pszMode )
return pFile;
}
HB_SIZE hb_fileResult( HB_SIZE nSize )
{
return nSize == ( HB_SIZE ) FS_ERROR ? 0 : nSize;
}