From 76b3f96d1d040af6a677ea7f13a6ac7d40e7fedc Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 30 May 2008 01:47:31 +0000 Subject: [PATCH] 2008-05-30 03:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/hbgtcore.c * removed unnecessary variable * harbour/contrib/hbw32/w32_ole.c * harbour/contrib/hbole/ole2.c * harbour/contrib/gtwvg/gtwvg.h ! use trick with HB_ID_REF() only for BCC and MSVC some other C++ compilers like OpenWatcom have different header files and does not need it. --- harbour/ChangeLog | 11 +++++++++++ harbour/contrib/gtwvg/gtwvg.h | 3 ++- harbour/contrib/hbole/ole2.c | 3 ++- harbour/contrib/hbw32/w32_ole.c | 3 ++- harbour/source/rtl/hbgtcore.c | 7 +++---- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 856760295a..5945b7169b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-05-30 03:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/hbgtcore.c + * removed unnecessary variable + + * harbour/contrib/hbw32/w32_ole.c + * harbour/contrib/hbole/ole2.c + * harbour/contrib/gtwvg/gtwvg.h + ! use trick with HB_ID_REF() only for BCC and MSVC + some other C++ compilers like OpenWatcom have different + header files and does not need it. + 2008-05-30 02:48 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbvm.h * harbour/source/vm/hvm.c diff --git a/harbour/contrib/gtwvg/gtwvg.h b/harbour/contrib/gtwvg/gtwvg.h index 2b8456dd10..74871bfc08 100644 --- a/harbour/contrib/gtwvg/gtwvg.h +++ b/harbour/contrib/gtwvg/gtwvg.h @@ -172,7 +172,8 @@ #endif #endif -#ifdef __cplusplus +#if defined( __cplusplus ) && \ + ( defined( __BORLANDC__ ) || defined( _MSC_VER ) ) # define HB_ID_REF( type, id ) id #else # define HB_ID_REF( type, id ) ( ( type ) &id ) diff --git a/harbour/contrib/hbole/ole2.c b/harbour/contrib/hbole/ole2.c index acb03c4792..5bd7b547e2 100644 --- a/harbour/contrib/hbole/ole2.c +++ b/harbour/contrib/hbole/ole2.c @@ -79,7 +79,8 @@ #define CINTERFACE 1 #endif -#ifdef __cplusplus +#if defined( __cplusplus ) && \ + ( defined( __BORLANDC__ ) || defined( _MSC_VER ) ) # define HB_ID_REF( type, id ) id #else # define HB_ID_REF( type, id ) ( ( type ) &id ) diff --git a/harbour/contrib/hbw32/w32_ole.c b/harbour/contrib/hbw32/w32_ole.c index b54ce7d2f8..835eb686c3 100644 --- a/harbour/contrib/hbw32/w32_ole.c +++ b/harbour/contrib/hbw32/w32_ole.c @@ -89,7 +89,8 @@ #define HB_LONG_LONG_OFF #endif -#ifdef __cplusplus +#if defined( __cplusplus ) && \ + ( defined( __BORLANDC__ ) || defined( _MSC_VER ) ) # define HB_ID_REF( type, id ) id #else # define HB_ID_REF( type, id ) ( ( type ) &id ) diff --git a/harbour/source/rtl/hbgtcore.c b/harbour/source/rtl/hbgtcore.c index ea164d95e0..53865ae946 100644 --- a/harbour/source/rtl/hbgtcore.c +++ b/harbour/source/rtl/hbgtcore.c @@ -1125,7 +1125,7 @@ static void hb_gt_def_ScrollArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, { if( iRows || iCols ) { - int iColOld, iColNew, iColSize, iColClear, iClrs, iLength, iHeight, iWidth; + int iColNew, iColSize, iColClear, iClrs, iLength, iHeight, iWidth; HB_GTSELF_GETSIZE( pGT, &iHeight, &iWidth ); if( iTop < 0 ) @@ -1139,20 +1139,19 @@ static void hb_gt_def_ScrollArea( PHB_GT pGT, int iTop, int iLeft, int iBottom, iColSize = iRight - iLeft; iLength = iColSize + 1; - iColOld = iColNew = iLeft; + iColNew = iLeft; if( iCols >= 0 ) { - iColOld += iCols; iColSize -= iCols; iColClear = iColNew + iColSize + 1; iClrs = iCols; } else { + iColClear = iColNew; iColNew -= iCols; iColSize += iCols; - iColClear = iColOld; iClrs = -iCols; }