diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 80cccac69c..3d54963b7c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-05 18:46 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbwin/win_ole.c + * source/rtl/wait.prg + * source/rtl/tthreadx.prg + * Minor formatting. + 2008-10-05 17:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/tests/speedtst.prg + added support for --scale switch - it enables special mode diff --git a/harbour/contrib/hbwin/win_ole.c b/harbour/contrib/hbwin/win_ole.c index b66d32f975..42be2dd084 100644 --- a/harbour/contrib/hbwin/win_ole.c +++ b/harbour/contrib/hbwin/win_ole.c @@ -315,49 +315,49 @@ HB_EXPORT void hb_oleItemToVariant( VARIANT *pVariant, PHB_ITEM pItem ) case HB_IT_STRING: case HB_IT_MEMO: { - ULONG ulLen = hb_itemGetCLen( pItem ); - - sString = hb_itemGetCPtr( pItem ); - - /* Check for hidden signature of SafeArrayToArray(). */ - if( ( int ) ( pItem->item.asString.allocated - ulLen ) >= 5 && /* TOFIX */ - sString[ ulLen ] == 0x7A && sString[ ulLen + 1 ] == 0x7B && sString[ ulLen + 2 ] == 0x7C && sString[ ulLen + 3 ] == 0x7D ) - { - vt = (VARTYPE) sString[ ulLen + 4 ]; - goto ItemToVariant_StringArray; - } - - if( bByRef ) - { - hb_itemPutCLConst( pItem, ( char * ) hb_oleAnsiToSysString( sString ), ulLen * 2 + 1 ); - - pVariant->n1.n2.vt = VT_BYREF | VT_BSTR; - pVariant->n1.n2.n3.pbstrVal = ( BSTR * ) &( pItem->item.asString.value ); /* TOFIX */ - /*wprintf( L"*** BYREF >%s<\n", *pVariant->n1.n2.n3.bstrVal );*/ - } - else - { - pVariant->n1.n2.vt = VT_BSTR; - pVariant->n1.n2.n3.bstrVal = hb_oleAnsiToSysString( sString ); - /*wprintf( L"*** >%s<\n", pVariant->n1.n2.n3.bstrVal );*/ - } - break; + ULONG ulLen = hb_itemGetCLen( pItem ); + + sString = hb_itemGetCPtr( pItem ); + + /* Check for hidden signature of SafeArrayToArray(). */ + if( ( int ) ( pItem->item.asString.allocated - ulLen ) >= 5 && /* TOFIX */ + sString[ ulLen ] == 0x7A && sString[ ulLen + 1 ] == 0x7B && sString[ ulLen + 2 ] == 0x7C && sString[ ulLen + 3 ] == 0x7D ) + { + vt = ( VARTYPE ) sString[ ulLen + 4 ]; + goto ItemToVariant_StringArray; + } + + if( bByRef ) + { + hb_itemPutCLConst( pItem, ( char * ) hb_oleAnsiToSysString( sString ), ulLen * 2 + 1 ); + + pVariant->n1.n2.vt = VT_BYREF | VT_BSTR; + pVariant->n1.n2.n3.pbstrVal = ( BSTR * ) &( pItem->item.asString.value ); /* TOFIX */ + /*wprintf( L"*** BYREF >%s<\n", *pVariant->n1.n2.n3.bstrVal );*/ + } + else + { + pVariant->n1.n2.vt = VT_BSTR; + pVariant->n1.n2.n3.bstrVal = hb_oleAnsiToSysString( sString ); + /*wprintf( L"*** >%s<\n", pVariant->n1.n2.n3.bstrVal );*/ + } + break; } case HB_IT_LOGICAL: - if( bByRef ) - { - pVariant->n1.n2.vt = VT_BYREF | VT_BOOL; - pVariant->n1.n2.n3.pboolVal = ( short * ) &( pItem->item.asLogical.value ) ; /* TOFIX */ - *pVariant->n1.n2.n3.pboolVal = hb_itemGetL( pItem ) ? VARIANT_TRUE : VARIANT_FALSE; - /*pItem->type = HB_IT_LONG;*/ - } - else - { - pVariant->n1.n2.vt = VT_BOOL; - pVariant->n1.n2.n3.boolVal = hb_itemGetL( pItem ) ? VARIANT_TRUE : VARIANT_FALSE; - } - break; + if( bByRef ) + { + pVariant->n1.n2.vt = VT_BYREF | VT_BOOL; + pVariant->n1.n2.n3.pboolVal = ( short * ) &( pItem->item.asLogical.value ) ; /* TOFIX */ + *pVariant->n1.n2.n3.pboolVal = hb_itemGetL( pItem ) ? VARIANT_TRUE : VARIANT_FALSE; + /*pItem->type = HB_IT_LONG;*/ + } + else + { + pVariant->n1.n2.vt = VT_BOOL; + pVariant->n1.n2.n3.boolVal = hb_itemGetL( pItem ) ? VARIANT_TRUE : VARIANT_FALSE; + } + break; case HB_IT_INTEGER: #if HB_INT_MAX == INT16_MAX @@ -489,7 +489,7 @@ HB_EXPORT void hb_oleItemToVariant( VARIANT *pVariant, PHB_ITEM pItem ) hb_vmPush( pItem ); hb_vmSend( 0 ); - vt = (VARTYPE) hb_parnl(-1); + vt = ( VARTYPE ) hb_parnl( -1 ); /* aArray := oVTArray:Value */ hb_vmPushDynSym( s_pSym_Value ); @@ -543,7 +543,7 @@ ItemToVariant_StringArray: hb_vmPush( pItem ); hb_vmSend( 0 ); - pVariant->n1.n2.vt = (VARTYPE) hb_parnl(-1); + pVariant->n1.n2.vt = ( VARTYPE ) hb_parnl( -1 ); /* value := oVT:value */ hb_vmPushDynSym( s_pSym_Value ); @@ -820,7 +820,7 @@ static void FreeParams( DISPPARAMS *pDispParams, PHB_ITEM *aPrgParams ) break; default: - if( (VARTYPE) ( pVariant->n1.n2.vt & ( VT_BYREF | VT_ARRAY ) ) == (VARTYPE) ( VT_BYREF | VT_ARRAY ) ) + if( ( VARTYPE ) ( pVariant->n1.n2.vt & ( VT_BYREF | VT_ARRAY ) ) == ( VARTYPE ) ( VT_BYREF | VT_ARRAY ) ) { VARTYPE vt; PHB_ITEM pArray; diff --git a/harbour/source/rtl/tthreadx.prg b/harbour/source/rtl/tthreadx.prg index 259bd1954b..8f361d0f79 100644 --- a/harbour/source/rtl/tthreadx.prg +++ b/harbour/source/rtl/tthreadx.prg @@ -55,12 +55,16 @@ #ifdef HB_COMPAT_XPP CREATE CLASS TSignal FUNCTION Signal + VAR cargo AS USUAL EXPORTED VAR mutex AS USUAL PROTECTED -EXPORTED: + + EXPORTED: + METHOD new() METHOD wait( nTimeOut ) METHOD signal() + ENDCLASS METHOD new() CLASS TSIGNAL @@ -68,7 +72,7 @@ METHOD new() CLASS TSIGNAL RETURN Self METHOD wait( nTimeOut ) CLASS TSIGNAL - /* TOCHECK: I do not know if strict xbase++ compatibility needs + /* TOCHECK: I do not know if strict Xbase++ compatibility needs * hb_mutexSubscribe() or hb_mutexSubscribeNow() * Please change it if necessary */ diff --git a/harbour/source/rtl/wait.prg b/harbour/source/rtl/wait.prg index 71dc38ec05..5a6e5d0c89 100644 --- a/harbour/source/rtl/wait.prg +++ b/harbour/source/rtl/wait.prg @@ -56,7 +56,7 @@ FUNCTION __Wait( xPrompt ) LOCAL nKey LOCAL bBlock - /* TODO: Here we can use LangApi to localize default message */ + /* TODO: Here we can use Lang API to localize default message */ QOut( iif( xPrompt == NIL, "Press any key to continue...", xPrompt ) ) DO WHILE .T.