diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 69600ff1dd..75c791b5a4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-09 16:33 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/hbqt_slots.cpp + % Eliminated two variables. + + * contrib/hbwin/oleinit.c + * contrib/hbwin/win_misc.c + * contrib/hbwin/wapi_winuser.c + * contrib/hbwin/axcore.c + * contrib/hbwin/olecore.c + * contrib/hbwin/win_com.c + * contrib/hbwin/wapi_commctrl.c + * Using HB_TRUE / HB_FALSE consistenly everywhere. + 2009-12-09 16:16 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Updated Open Watcom product names to reflect that now plain C diff --git a/harbour/contrib/hbqt/hbqt_slots.cpp b/harbour/contrib/hbqt/hbqt_slots.cpp index 43b466d73e..765a45b759 100644 --- a/harbour/contrib/hbqt/hbqt_slots.cpp +++ b/harbour/contrib/hbqt/hbqt_slots.cpp @@ -98,8 +98,7 @@ static HB_TSD_NEW( s_slots, sizeof( HB_SLOTS ), NULL, NULL ); static void qt_setEventFilter() { - Events * t_events = HB_GETQTEVENTFILTER()->t_events; - if( ! t_events ) + if( ! HB_GETQTEVENTFILTER()->t_events ) HB_GETQTEVENTFILTER()->t_events = new Events(); } @@ -110,8 +109,7 @@ static Events * qt_getEventFilter( void ) static void qt_setEventSlots() { - Slots * t_slots = HB_GETQTEVENTSLOTS()->t_slots; - if( ! t_slots ) + if( ! HB_GETQTEVENTSLOTS()->t_slots ) HB_GETQTEVENTSLOTS()->t_slots = new Slots(); } diff --git a/harbour/contrib/hbwin/axcore.c b/harbour/contrib/hbwin/axcore.c index e724e8d356..a4c7ae1f12 100644 --- a/harbour/contrib/hbwin/axcore.c +++ b/harbour/contrib/hbwin/axcore.c @@ -67,7 +67,7 @@ static void hb_errRT_OLE( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, HB_ERRCO pError = hb_errRT_New( ES_ERROR, "WINOLE", errGenCode, errSubCode, szDescription, szOperation, errOsCode, EF_NONE ); if( hb_pcount() != 0 ) - { + { /* HB_ERR_ARGS_BASEPARAMS */ PHB_ITEM pArray = hb_arrayBaseParams(); hb_errPutArgsArray( pError, pArray ); @@ -112,7 +112,7 @@ HB_BOOL hb_oleAxInit( void ) hb_vmAtQuit( hb_oleAxExit, NULL ); } - return TRUE; + return HB_TRUE; } diff --git a/harbour/contrib/hbwin/olecore.c b/harbour/contrib/hbwin/olecore.c index 3671be0483..9b0ce71f6d 100644 --- a/harbour/contrib/hbwin/olecore.c +++ b/harbour/contrib/hbwin/olecore.c @@ -181,7 +181,7 @@ static void hb_errRT_OLE( HB_ERRCODE errGenCode, HB_ERRCODE errSubCode, HB_ERRCO pError = hb_errRT_New( ES_ERROR, "WINOLE", errGenCode, errSubCode, szDescription, szOperation, errOsCode, EF_NONE ); if( hb_pcount() != 0 ) - { + { /* HB_ERR_ARGS_BASEPARAMS */ PHB_ITEM pArray = hb_arrayBaseParams(); hb_errPutArgsArray( pError, pArray ); @@ -656,11 +656,11 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant ) break; case VT_BOOL: - hb_itemPutL( pItem, pVariant->n1.n2.n3.boolVal ? TRUE : FALSE ); + hb_itemPutL( pItem, pVariant->n1.n2.n3.boolVal ? HB_TRUE : HB_FALSE ); break; case VT_BOOL | VT_BYREF: - hb_itemPutL( pItem, *pVariant->n1.n2.n3.pboolVal ? TRUE : FALSE ); + hb_itemPutL( pItem, *pVariant->n1.n2.n3.pboolVal ? HB_TRUE : HB_FALSE ); break; case VT_I1: @@ -1281,10 +1281,10 @@ HB_FUNC( __OLEENUMNEXT ) { hb_oleVariantToItem( hb_stackReturnItem(), &variant ); VariantClear( &variant ); - hb_storl( TRUE, 2 ); + hb_storl( HB_TRUE, 2 ); } else - hb_storl( FALSE, 2 ); + hb_storl( HB_FALSE, 2 ); } diff --git a/harbour/contrib/hbwin/oleinit.c b/harbour/contrib/hbwin/oleinit.c index 6ee0d9cac7..83f83d75b8 100644 --- a/harbour/contrib/hbwin/oleinit.c +++ b/harbour/contrib/hbwin/oleinit.c @@ -74,7 +74,7 @@ static void hb_ole_exit( void* cargo ) HB_BOOL hb_oleInit( void ) { - HB_BOOL fResult = TRUE; + HB_BOOL fResult = HB_TRUE; if( ! s_iOleInit ) { diff --git a/harbour/contrib/hbwin/wapi_commctrl.c b/harbour/contrib/hbwin/wapi_commctrl.c index 8657dad208..064cbe3940 100644 --- a/harbour/contrib/hbwin/wapi_commctrl.c +++ b/harbour/contrib/hbwin/wapi_commctrl.c @@ -272,10 +272,10 @@ HB_FUNC( WAPI_IMAGELIST_GETICONSIZE ) { hb_storni( cx, 2 ); hb_storni( cy, 3 ); - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } /*----------------------------------------------------------------------*/ /* diff --git a/harbour/contrib/hbwin/wapi_winuser.c b/harbour/contrib/hbwin/wapi_winuser.c index 9bb9321b78..b03003ec30 100644 --- a/harbour/contrib/hbwin/wapi_winuser.c +++ b/harbour/contrib/hbwin/wapi_winuser.c @@ -203,13 +203,13 @@ HB_FUNC( WAPI_GETSCROLLRANGE ) hb_storni( minPos, 3 ); hb_storni( maxPos, 4 ); - wapi_ret_L( TRUE ); + wapi_ret_L( HB_TRUE ); return; } } #endif - wapi_ret_L( FALSE ); + wapi_ret_L( HB_FALSE ); } /*----------------------------------------------------------------------*/ #if 0 diff --git a/harbour/contrib/hbwin/win_com.c b/harbour/contrib/hbwin/win_com.c index 094b0813c0..d83193b252 100644 --- a/harbour/contrib/hbwin/win_com.c +++ b/harbour/contrib/hbwin/win_com.c @@ -290,18 +290,18 @@ HB_FUNC( WIN_COMSTATUS ) hb_storl( ( dwModemStat & MS_RING_ON ) != 0, 4 ); /* The ring indicator signal is on. */ hb_storl( ( dwModemStat & MS_RLSD_ON ) != 0, 5 ); /* The RLSD (receive-line-signal-detect) signal is on. Also is DCD. */ - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else { s_PortData[ iPort ].dwError = GetLastError(); - hb_storl( FALSE, 2 ); - hb_storl( FALSE, 3 ); - hb_storl( FALSE, 4 ); - hb_storl( FALSE, 5 ); + hb_storl( HB_FALSE, 2 ); + hb_storl( HB_FALSE, 3 ); + hb_storl( HB_FALSE, 4 ); + hb_storl( HB_FALSE, 5 ); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } else @@ -321,11 +321,11 @@ HB_FUNC( WIN_COMPURGE ) s_PortData[ iPort ].iFunction = WIN_COM_FUN_PURGECOMM; s_PortData[ iPort ].dwError = 0; if( PurgeComm( hCommPort, dwFlags ) ) - hb_retl( TRUE ); + hb_retl( HB_TRUE ); else { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } else @@ -354,21 +354,21 @@ HB_FUNC( WIN_COMQUEUESTATUS ) hb_stornl( ComStat.cbInQue, 7 ); hb_stornl( ComStat.cbOutQue, 8 ); /* This value will be zero for a nonoverlapped write */ - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else { s_PortData[ iPort ].dwError = GetLastError(); - hb_storl( FALSE, 2 ); - hb_storl( FALSE, 3 ); - hb_storl( FALSE, 4 ); - hb_storl( FALSE, 5 ); - hb_storl( FALSE, 6 ); + hb_storl( HB_FALSE, 2 ); + hb_storl( HB_FALSE, 3 ); + hb_storl( HB_FALSE, 4 ); + hb_storl( HB_FALSE, 5 ); + hb_storl( HB_FALSE, 6 ); hb_stornl( 0, 7 ); hb_stornl( 0, 8 ); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } else @@ -390,11 +390,11 @@ HB_FUNC( WIN_COMSETRTS ) s_PortData[ iPort ].iFunction = WIN_COM_FUN_ESCAPECOMMFUNCTION; s_PortData[ iPort ].dwError = 0; if( EscapeCommFunction( hCommPort, dwFunc ) ) - hb_retl( TRUE ); + hb_retl( HB_TRUE ); else { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } else @@ -416,11 +416,11 @@ HB_FUNC( WIN_COMSETDTR ) s_PortData[ iPort ].iFunction = WIN_COM_FUN_ESCAPECOMMFUNCTION; s_PortData[ iPort ].dwError = 0; if( EscapeCommFunction( hCommPort, dwFunc ) ) - hb_retl( TRUE ); + hb_retl( HB_TRUE ); else { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } } else @@ -443,7 +443,7 @@ HB_FUNC( WIN_COMRTSFLOW ) if( ! GetCommState( hCommPort, &CurDCB ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); return; } @@ -464,7 +464,7 @@ HB_FUNC( WIN_COMRTSFLOW ) } else /* RTS_CONTROL_TOGGLE - RS485? */ { - hb_retl( FALSE ); + hb_retl( HB_FALSE ); return; } @@ -473,10 +473,10 @@ HB_FUNC( WIN_COMRTSFLOW ) if( ! SetCommState( hCommPort, &CurDCB ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } else - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -498,7 +498,7 @@ HB_FUNC( WIN_COMDTRFLOW ) if( ! GetCommState( hCommPort, &CurDCB ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); return; } @@ -519,7 +519,7 @@ HB_FUNC( WIN_COMDTRFLOW ) } else { - hb_retl( FALSE ); + hb_retl( HB_FALSE ); return; } @@ -528,10 +528,10 @@ HB_FUNC( WIN_COMDTRFLOW ) if( ! SetCommState( hCommPort, &CurDCB ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } else - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -552,7 +552,7 @@ HB_FUNC( WIN_COMXONXOFFFLOW ) if( ! GetCommState( hCommPort, &CurDCB ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); return; } @@ -572,10 +572,10 @@ HB_FUNC( WIN_COMXONXOFFFLOW ) if( ! SetCommState( hCommPort, &CurDCB ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } else - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -657,7 +657,7 @@ HB_FUNC( WIN_COMSETTIMEOUTS ) if( ! GetCommState( hCommPort, &CurDCB ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); return; } @@ -666,10 +666,10 @@ HB_FUNC( WIN_COMSETTIMEOUTS ) if( ! hb_win_ComSetTimeouts( hCommPort, &Timeouts, CurDCB.BaudRate, CurDCB.Parity, CurDCB.ByteSize, CurDCB.StopBits ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } else - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -687,10 +687,10 @@ HB_FUNC( WIN_COMSETQUEUESIZE ) if( ! SetupComm( hCommPort, hb_parni( 2 ), hb_parni( 3 ) ) ) { s_PortData[ iPort ].dwError = GetLastError(); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } else - hb_retl( TRUE ); + hb_retl( HB_TRUE ); } else hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); diff --git a/harbour/contrib/hbwin/win_misc.c b/harbour/contrib/hbwin/win_misc.c index 099afa3e53..0213e9f5ae 100644 --- a/harbour/contrib/hbwin/win_misc.c +++ b/harbour/contrib/hbwin/win_misc.c @@ -111,7 +111,7 @@ HB_FUNC( WIN_RUNDETACHED ) #endif ) { - hb_retl( TRUE ); + hb_retl( HB_TRUE ); #if ! defined( HB_OS_WIN_CE ) hb_stornl( pi.dwProcessId, 3 ); @@ -124,7 +124,7 @@ HB_FUNC( WIN_RUNDETACHED ) else { hb_stornl( -1, 3 ); - hb_retl( FALSE ); + hb_retl( HB_FALSE ); } if( lpCommandName ) HB_TCHAR_FREE( lpCommandName );