From a5d2777f5c63b0d307c5e94df6f4849ad535b61d Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 18 Nov 2009 19:16:08 +0000 Subject: [PATCH] 2009-11-18 20:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/strapi.c ! fixed return value in hb_itemCopyStr() * harbour/contrib/hbct/files.c * harbour/contrib/hbct/disk.c ! fixed to work with HB_ERRCODE declared as unsigned int --- harbour/ChangeLog | 8 ++++++++ harbour/contrib/hbct/disk.c | 2 +- harbour/contrib/hbct/files.c | 6 +++--- harbour/src/vm/strapi.c | 8 ++++---- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3c0d4897cb..bb0f413d08 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-18 20:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/strapi.c + ! fixed return value in hb_itemCopyStr() + + * harbour/contrib/hbct/files.c + * harbour/contrib/hbct/disk.c + ! fixed to work with HB_ERRCODE declared as unsigned int + 2009-11-18 18:20 UTC+0100 Istvan Bisz (istvan.bisz/at/t-online.hu) * harbour/contrib/hbqt/hbqt_destruct.cpp * harbour/contrib/hbqt/hbqt.ch diff --git a/harbour/contrib/hbct/disk.c b/harbour/contrib/hbct/disk.c index fe379f0635..e8c9bd03ee 100644 --- a/harbour/contrib/hbct/disk.c +++ b/harbour/contrib/hbct/disk.c @@ -92,7 +92,7 @@ HB_FUNC( DIRMAKE ) if( hb_fsMkDir( pFileName ) ) hb_retni( 0 ); else - hb_retni( -hb_fsOsError() ); + hb_retnint( - ( HB_LONG ) hb_fsOsError() ); } HB_FUNC( DIRNAME ) diff --git a/harbour/contrib/hbct/files.c b/harbour/contrib/hbct/files.c index 728f4099a6..d429addedb 100644 --- a/harbour/contrib/hbct/files.c +++ b/harbour/contrib/hbct/files.c @@ -306,8 +306,8 @@ HB_FUNC( FILEDELETE ) HB_FUNC( FILEMOVE ) { - hb_retni( hb_fsRename( hb_parcx( 1 ), - hb_parcx( 2 ) ) ? 0 : -hb_fsOsError() ); + hb_retnint( hb_fsRename( hb_parcx( 1 ), + hb_parcx( 2 ) ) ? 0 : - ( HB_LONG ) hb_fsOsError() ); } @@ -319,7 +319,7 @@ HB_FUNC( RENAMEFILE ) HB_FUNC( DELETEFILE ) { - hb_retni( hb_fsDelete( hb_parcx( 1 ) ) ? 0 : -hb_fsOsError() ); + hb_retnint( hb_fsDelete( hb_parcx( 1 ) ) ? 0 : - ( HB_LONG ) hb_fsOsError() ); } diff --git a/harbour/src/vm/strapi.c b/harbour/src/vm/strapi.c index 00530ac68a..06bcb54726 100644 --- a/harbour/src/vm/strapi.c +++ b/harbour/src/vm/strapi.c @@ -190,10 +190,10 @@ ULONG hb_itemCopyStr( PHB_ITEM pItem, void * cdp, char * pStrBuffer, ULONG ulSiz if( HB_IS_STRING( pItem ) ) { - ulSize = hb_cdpTransTo( pItem->item.asString.value, - pItem->item.asString.length, - pStrBuffer, ulSize, - hb_vmCDP(), ( PHB_CODEPAGE ) cdp ); + return hb_cdpTransTo( pItem->item.asString.value, + pItem->item.asString.length, + pStrBuffer, ulSize, + hb_vmCDP(), ( PHB_CODEPAGE ) cdp ); } return 0;