2007-03-30 15:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbexprb.c
% optimize PCODE generated for IIF() used as statement
* harbour/include/hbpp.h
* fixed typo in comment
* harbour/source/pp/ppcore.c
* fixed .ppo output in some string expressions inside []
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
+ added some missing DBOI_* actions
* harbour/source/rtl/hbregex.c
+ added comment
* harbour/source/vm/hashes.c
* set autoadd by default when compiled with HB_COMPAT_XHB macro
* harbour/source/debug/debugger.prg
* harbour/source/rdd/dbstrux.prg
* harbour/source/rtl/tbrowse.prg
* removed unnecessary NIL in in IIF() statements
* harbour/utils/hbtest/rt_misc.prg
* removed unnecessary ::cValue in in IIF() statements
This commit is contained in:
@@ -8,6 +8,33 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-03-30 15:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbexprb.c
|
||||
% optimize PCODE generated for IIF() used as statement
|
||||
|
||||
* harbour/include/hbpp.h
|
||||
* fixed typo in comment
|
||||
|
||||
* harbour/source/pp/ppcore.c
|
||||
* fixed .ppo output in some string expressions inside []
|
||||
|
||||
* harbour/source/rdd/dbfcdx/dbfcdx1.c
|
||||
* harbour/source/rdd/dbfntx/dbfntx1.c
|
||||
+ added some missing DBOI_* actions
|
||||
|
||||
* harbour/source/rtl/hbregex.c
|
||||
+ added comment
|
||||
|
||||
* harbour/source/vm/hashes.c
|
||||
* set autoadd by default when compiled with HB_COMPAT_XHB macro
|
||||
|
||||
* harbour/source/debug/debugger.prg
|
||||
* harbour/source/rdd/dbstrux.prg
|
||||
* harbour/source/rtl/tbrowse.prg
|
||||
* removed unnecessary NIL in in IIF() statements
|
||||
* harbour/utils/hbtest/rt_misc.prg
|
||||
* removed unnecessary ::cValue in in IIF() statements
|
||||
|
||||
2007-03-23 04:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/harbour.spec
|
||||
* harbour/hbgtmk.sh
|
||||
|
||||
@@ -841,37 +841,72 @@ static HB_EXPR_FUNC( hb_compExprUseIIF )
|
||||
break;
|
||||
|
||||
case HB_EA_PUSH_PCODE:
|
||||
{
|
||||
/* this is called if all three parts of IIF expression should be generated
|
||||
*/
|
||||
LONG lPosFalse, lPosEnd;
|
||||
HB_EXPR_PTR pExpr = pSelf->value.asList.pExprList;
|
||||
{
|
||||
/* this is called if all three parts of IIF expression should be generated
|
||||
*/
|
||||
LONG lPosFalse, lPosEnd;
|
||||
HB_EXPR_PTR pExpr = pSelf->value.asList.pExprList;
|
||||
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_PCODE );
|
||||
lPosFalse = HB_GEN_FUNC1( JumpFalse, 0 );
|
||||
pExpr =pExpr->pNext;
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_PCODE );
|
||||
lPosFalse = HB_GEN_FUNC1( JumpFalse, 0 );
|
||||
pExpr =pExpr->pNext;
|
||||
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_PCODE );
|
||||
lPosEnd = HB_GEN_FUNC1( Jump, 0 );
|
||||
pExpr =pExpr->pNext;
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_PCODE );
|
||||
lPosEnd = HB_GEN_FUNC1( Jump, 0 );
|
||||
pExpr =pExpr->pNext;
|
||||
|
||||
HB_GEN_FUNC1( JumpHere, lPosFalse );
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_PCODE );
|
||||
HB_GEN_FUNC1( JumpHere, lPosEnd );
|
||||
}
|
||||
HB_GEN_FUNC1( JumpHere, lPosFalse );
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_PCODE );
|
||||
HB_GEN_FUNC1( JumpHere, lPosEnd );
|
||||
break;
|
||||
|
||||
}
|
||||
case HB_EA_POP_PCODE:
|
||||
break;
|
||||
|
||||
case HB_EA_PUSH_POP:
|
||||
case HB_EA_STATEMENT:
|
||||
{
|
||||
HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE );
|
||||
HB_GEN_FUNC1( PCode1, HB_P_POP ); /* remove a value if used in statement */
|
||||
}
|
||||
break;
|
||||
{
|
||||
#ifdef HB_C52_STRICT
|
||||
HB_EXPR_USE( pSelf, HB_EA_PUSH_PCODE );
|
||||
HB_GEN_FUNC1( PCode1, HB_P_POP ); /* remove a value if used in statement */
|
||||
#else
|
||||
ULONG ulPosFalse, ulPosEnd;
|
||||
HB_EXPR_PTR pExpr = pSelf->value.asList.pExprList;
|
||||
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_PCODE );
|
||||
ulPosFalse = HB_GEN_FUNC1( JumpFalse, 0 );
|
||||
pExpr =pExpr->pNext;
|
||||
|
||||
/* do not generate warning about meaningless use of expression NIL */
|
||||
if( pExpr->ExprType != HB_ET_NIL )
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_POP );
|
||||
pExpr =pExpr->pNext;
|
||||
|
||||
#if defined( HB_MACRO_SUPPORT )
|
||||
if( HB_PCODE_DATA->lPCodePos == ulPosFalse + 3 )
|
||||
{
|
||||
HB_PCODE_DATA->pCode[ ulPosFalse - 1 ] = HB_P_JUMPTRUEFAR;
|
||||
ulPosEnd = ulPosFalse;
|
||||
}
|
||||
#else
|
||||
if( HB_COMP_PARAM->functions.pLast->lPCodePos == ulPosFalse + 3 )
|
||||
{
|
||||
HB_COMP_PARAM->functions.pLast->pCode[ ulPosFalse - 1 ] = HB_P_JUMPTRUEFAR;
|
||||
ulPosEnd = ulPosFalse;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
ulPosEnd = HB_GEN_FUNC1( Jump, 0 );
|
||||
HB_GEN_FUNC1( JumpHere, ulPosFalse );
|
||||
}
|
||||
/* do not generate warning about meaningless use of expression NIL */
|
||||
if( pExpr->ExprType != HB_ET_NIL )
|
||||
HB_EXPR_USE( pExpr, HB_EA_PUSH_POP );
|
||||
HB_GEN_FUNC1( JumpHere, ulPosEnd );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case HB_EA_DELETE:
|
||||
if( pSelf->value.asList.pExprList )
|
||||
{
|
||||
|
||||
@@ -236,7 +236,7 @@ typedef HB_PP_SWITCH_FUNC * PHB_PP_SWITCH_FUNC;
|
||||
# define HB_PP_TOKEN_ISEOS(t) HB_PP_TOKEN_ISEOL(t)
|
||||
# define HB_PP_TOKEN_ISEOP(t,l) HB_PP_TOKEN_ISEOL(t)
|
||||
#else
|
||||
/* End Of Subst - define how mant tokens in line should be translated,
|
||||
/* End Of Subst - define how many tokens in line should be translated,
|
||||
Clipper translate whole line */
|
||||
# define HB_PP_TOKEN_ISEOS(t) ( HB_PP_TOKEN_ISEOL(t) || \
|
||||
( HB_PP_TOKEN_TYPE((t)->type) == HB_PP_TOKEN_EOC && \
|
||||
|
||||
@@ -396,7 +396,7 @@ CLASS TDebugger
|
||||
METHOD LocatePrgPath( cPrgName )
|
||||
METHOD Sort() INLINE ASort( ::aVars,,, {|x,y| x[1] < y[1] } ),;
|
||||
::lSortVars := .t.,;
|
||||
iif( ::oBrwVars != nil, ::oBrwVars:RefreshAll(), nil ),;
|
||||
iif( ::oBrwVars != nil, ::oBrwVars:RefreshAll(), ),;
|
||||
iif( ::oWndVars != nil .and. ::oWndVars:lVisible, iif(!::lGo,::oBrwVars:ForceStable(),),)
|
||||
|
||||
METHOD Speed() INLINE ;
|
||||
@@ -1733,12 +1733,12 @@ METHOD ShowVars() CLASS TDebugger
|
||||
::oWndVars:bPainted := { || if(Len( ::aVars ) > 0, ( ::obrwVars:refreshAll():ForceStable(),RefreshVarsS(::oBrwVars) ),) }
|
||||
|
||||
::oWndVars:bKeyPressed := { | nKey | ( iif( nKey == K_DOWN ;
|
||||
, ::oBrwVars:Down(), nil ), iif( nKey == K_UP, ::oBrwVars:Up(), nil ) ;
|
||||
, iif( nKey == K_PGDN, ::oBrwVars:PageDown(), nil ) ;
|
||||
, iif( nKey == K_PGUP, ::oBrwVars:PageUp(), nil ) ;
|
||||
, iif( nKey == K_HOME, ::oBrwVars:GoTop(), nil ) ;
|
||||
, iif( nKey == K_END, ::oBrwVars:GoBottom(), nil ) ;
|
||||
, iif( nKey == K_ENTER, ::EditVar( ::oBrwVars:Cargo[1] ), nil ), IIF(LEN(::aVars)>0,::oBrwVars:ForceStable(),nil) ) }
|
||||
, ::oBrwVars:Down(), ), iif( nKey == K_UP, ::oBrwVars:Up(), ) ;
|
||||
, iif( nKey == K_PGDN, ::oBrwVars:PageDown(), ) ;
|
||||
, iif( nKey == K_PGUP, ::oBrwVars:PageUp(), ) ;
|
||||
, iif( nKey == K_HOME, ::oBrwVars:GoTop(), ) ;
|
||||
, iif( nKey == K_END, ::oBrwVars:GoBottom(), ) ;
|
||||
, iif( nKey == K_ENTER, ::EditVar( ::oBrwVars:Cargo[1] ), ), IIF(LEN(::aVars)>0,::oBrwVars:ForceStable(),) ) }
|
||||
|
||||
AAdd( ::aWindows, ::oWndVars )
|
||||
::oWndVars:Show()
|
||||
@@ -2810,13 +2810,13 @@ METHOD WatchPointsShow() CLASS TDebugger
|
||||
::oWndPnt:bPainted := { || if(Len(::aWatch) > 0, ( ::oBrwPnt:refreshAll():ForceStable(),RefreshVarsS(::oBrwPnt) ),) }
|
||||
|
||||
::oWndPnt:bKeyPressed := { | nKey | ( iif( nKey == K_DOWN ;
|
||||
, ::oBrwPnt:Down(), nil ), iif( nKey == K_UP, ::oBrwPnt:Up(), nil ) ;
|
||||
, iif( nKey == K_PGDN, ::oBrwPnt:PageDown(), nil ) ;
|
||||
, iif( nKey == K_PGUP, ::oBrwPnt:PageUp(), nil ) ;
|
||||
, iif( nKey == K_HOME, ::oBrwPnt:GoTop(), nil ) ;
|
||||
, iif( nKey == K_END, ::oBrwPnt:GoBottom(), nil ) ;
|
||||
, iif( nKey == K_DEL, ::WatchpointDel( ::oBrwPnt:Cargo[1] ), nil ) ;
|
||||
, iif( nKey == K_ENTER, ::WatchpointEdit( ::oBrwPnt:Cargo[1] ), nil ), ::oBrwPnt:ForceStable() ) }
|
||||
, ::oBrwPnt:Down(), ), iif( nKey == K_UP, ::oBrwPnt:Up(), ) ;
|
||||
, iif( nKey == K_PGDN, ::oBrwPnt:PageDown(), ) ;
|
||||
, iif( nKey == K_PGUP, ::oBrwPnt:PageUp(), ) ;
|
||||
, iif( nKey == K_HOME, ::oBrwPnt:GoTop(), ) ;
|
||||
, iif( nKey == K_END, ::oBrwPnt:GoBottom(), ) ;
|
||||
, iif( nKey == K_DEL, ::WatchpointDel( ::oBrwPnt:Cargo[1] ), ) ;
|
||||
, iif( nKey == K_ENTER, ::WatchpointEdit( ::oBrwPnt:Cargo[1] ), ), ::oBrwPnt:ForceStable() ) }
|
||||
|
||||
AAdd( ::aWindows, ::oWndPnt )
|
||||
::oWndPnt:Show()
|
||||
|
||||
@@ -3124,13 +3124,31 @@ static BOOL hb_pp_tokenCanStartExp( PHB_PP_TOKEN pToken )
|
||||
{
|
||||
if( HB_PP_TOKEN_TYPE( pToken->type ) != HB_PP_TOKEN_LEFT_SB )
|
||||
return TRUE;
|
||||
|
||||
pToken = pToken->pNext;
|
||||
while( !HB_PP_TOKEN_ISEOC( pToken ) )
|
||||
else
|
||||
{
|
||||
if( HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_TOKEN_RIGHT_SB )
|
||||
return TRUE;
|
||||
PHB_PP_TOKEN pEoc = NULL;
|
||||
|
||||
pToken = pToken->pNext;
|
||||
while( !HB_PP_TOKEN_ISEOL( pToken ) )
|
||||
{
|
||||
if( HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_TOKEN_RIGHT_SB )
|
||||
{
|
||||
if( pEoc )
|
||||
{
|
||||
do
|
||||
{
|
||||
if( HB_PP_TOKEN_TYPE( pEoc->type ) == HB_PP_TOKEN_EOC )
|
||||
HB_PP_TOKEN_SETTYPE( pEoc, HB_PP_TOKEN_TEXT );
|
||||
pEoc = pEoc->pNext;
|
||||
}
|
||||
while( pEoc != pToken );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
if( !pEoc && HB_PP_TOKEN_TYPE( pToken->type ) == HB_PP_TOKEN_EOC )
|
||||
pEoc = pToken;
|
||||
pToken = pToken->pNext;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
@@ -5323,15 +5341,29 @@ void hb_pp_tokenToString( PHB_PP_STATE pState, PHB_PP_TOKEN pToken )
|
||||
{
|
||||
PHB_PP_TOKEN pTok, pFirst, pLast = NULL;
|
||||
pFirst = pTok = pToken->pNext;
|
||||
while( !HB_PP_TOKEN_ISEOC( pTok ) )
|
||||
while( !HB_PP_TOKEN_ISEOL( pTok ) )
|
||||
{
|
||||
pLast = pTok;
|
||||
if( HB_PP_TOKEN_TYPE( pTok->type ) == HB_PP_TOKEN_RIGHT_SB )
|
||||
{
|
||||
while( pTok->spaces > 0 )
|
||||
{
|
||||
hb_membufAddCh( pState->pBuffer, ' ' );
|
||||
pTok->spaces--;
|
||||
}
|
||||
fError = FALSE;
|
||||
pTok = pTok->pNext;
|
||||
break;
|
||||
}
|
||||
else if( HB_PP_TOKEN_TYPE( pTok->type ) == HB_PP_TOKEN_EOC &&
|
||||
!pTok->pNext && pState->pFile->pTokenList )
|
||||
{
|
||||
#if !defined( HB_PP_NO_LINEINFO_TOKEN )
|
||||
pState->pFile->iLastLine = pState->pFile->iCurrentLine +
|
||||
#endif
|
||||
hb_pp_tokenMoveCommand( &pTok->pNext,
|
||||
&pState->pFile->pTokenList );
|
||||
}
|
||||
hb_pp_tokenStr( pTok, pState->pBuffer, TRUE, FALSE, 0 );
|
||||
pTok = pTok->pNext;
|
||||
}
|
||||
@@ -5344,6 +5376,13 @@ void hb_pp_tokenToString( PHB_PP_STATE pState, PHB_PP_TOKEN pToken )
|
||||
hb_pp_tokenSetValue( pToken, hb_membufPtr( pState->pBuffer ),
|
||||
hb_membufLen( pState->pBuffer ) );
|
||||
HB_PP_TOKEN_SETTYPE( pToken, HB_PP_TOKEN_STRING );
|
||||
if( pState->fWritePreprocesed )
|
||||
{
|
||||
if( !fError )
|
||||
hb_membufAddCh( pState->pBuffer, ']' );
|
||||
fwrite( hb_membufPtr( pState->pBuffer ), sizeof( char ),
|
||||
hb_membufLen( pState->pBuffer ), pState->file_out );
|
||||
}
|
||||
}
|
||||
|
||||
if( fError )
|
||||
|
||||
@@ -7709,6 +7709,41 @@ static ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pO
|
||||
|
||||
switch( uiIndex )
|
||||
{
|
||||
case DBOI_STRICTREAD:
|
||||
if( pOrderInfo->itmResult )
|
||||
hb_itemClear( pOrderInfo->itmResult );
|
||||
else
|
||||
pOrderInfo->itmResult = hb_itemNew( NULL );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_STRICTREAD, 0, pOrderInfo->itmResult );
|
||||
|
||||
case DBOI_OPTIMIZE:
|
||||
if( pOrderInfo->itmResult )
|
||||
hb_itemClear( pOrderInfo->itmResult );
|
||||
else
|
||||
pOrderInfo->itmResult = hb_itemNew( NULL );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_OPTIMIZE, 0, pOrderInfo->itmResult );
|
||||
|
||||
case DBOI_AUTOOPEN:
|
||||
if( pOrderInfo->itmResult )
|
||||
hb_itemClear( pOrderInfo->itmResult );
|
||||
else
|
||||
pOrderInfo->itmResult = hb_itemNew( NULL );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_AUTOOPEN, 0, pOrderInfo->itmResult );
|
||||
|
||||
case DBOI_AUTOORDER:
|
||||
if( pOrderInfo->itmResult )
|
||||
hb_itemClear( pOrderInfo->itmResult );
|
||||
else
|
||||
pOrderInfo->itmResult = hb_itemNew( NULL );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_AUTOORDER, 0, pOrderInfo->itmResult );
|
||||
|
||||
case DBOI_AUTOSHARE:
|
||||
if( pOrderInfo->itmResult )
|
||||
hb_itemClear( pOrderInfo->itmResult );
|
||||
else
|
||||
pOrderInfo->itmResult = hb_itemNew( NULL );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_AUTOSHARE, 0, pOrderInfo->itmResult );
|
||||
|
||||
case DBOI_BAGEXT:
|
||||
if( pOrderInfo->itmResult )
|
||||
hb_itemClear( pOrderInfo->itmResult );
|
||||
@@ -7774,6 +7809,45 @@ static ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pO
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
case DBOI_BAGCOUNT:
|
||||
{
|
||||
LPCDXINDEX pIndex = pArea->lpIndexes;
|
||||
while ( pIndex )
|
||||
{
|
||||
++uiTag;
|
||||
pIndex = pIndex->pNext;
|
||||
}
|
||||
pOrderInfo->itmResult = hb_itemPutNI( pOrderInfo->itmResult, uiTag );
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
case DBOI_BAGNUMBER:
|
||||
{
|
||||
LPCDXINDEX pIndex = pArea->lpIndexes, pIndexSeek;
|
||||
|
||||
if( hb_itemGetCLen( pOrderInfo->atomBagName ) > 0 )
|
||||
pIndexSeek = hb_cdxFindBag( pArea,
|
||||
hb_itemGetCPtr( pOrderInfo->atomBagName ) );
|
||||
else
|
||||
pIndexSeek = pIndex;
|
||||
|
||||
if( pIndexSeek )
|
||||
{
|
||||
++uiTag;
|
||||
do
|
||||
{
|
||||
if( pIndex == pIndexSeek )
|
||||
break;
|
||||
++uiTag;
|
||||
pIndex = pIndex->pNext;
|
||||
}
|
||||
while ( pIndex );
|
||||
}
|
||||
pOrderInfo->itmResult = hb_itemPutNI( pOrderInfo->itmResult,
|
||||
pIndex ? uiTag : 0 );
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
case DBOI_BAGORDER:
|
||||
{
|
||||
LPCDXINDEX pIndex = pArea->lpIndexes, pIndexSeek;
|
||||
@@ -8043,6 +8117,12 @@ static ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pO
|
||||
pOrderInfo->itmResult = hb_itemPutNI( pOrderInfo->itmResult, pTag ? pTag->uiLen : 0 );
|
||||
break;
|
||||
|
||||
case DBOI_KEYDEC:
|
||||
/* there is no fixed number of decimal places for numeric keys
|
||||
in CDX format */
|
||||
pOrderInfo->itmResult = hb_itemPutNI( pOrderInfo->itmResult, 0 );
|
||||
break;
|
||||
|
||||
case DBOI_KEYVAL:
|
||||
hb_itemClear( pOrderInfo->itmResult );
|
||||
if( pArea->lpdbPendingRel )
|
||||
@@ -8139,6 +8219,14 @@ static ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pO
|
||||
}
|
||||
break;
|
||||
|
||||
/* TODO: */
|
||||
/*
|
||||
case DBOI_TEMPLATE:
|
||||
case DBOI_MULTIKEY:
|
||||
case DBOI_PARTIAL:
|
||||
case DBOI_CHGONLY:
|
||||
*/
|
||||
|
||||
case DBOI_KEYADD:
|
||||
if ( !pTag )
|
||||
{
|
||||
@@ -8251,6 +8339,38 @@ static ERRCODE hb_cdxOrderInfo( CDXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pO
|
||||
pOrderInfo->itmResult = hb_itemPutL( pOrderInfo->itmResult, FALSE );
|
||||
break;
|
||||
|
||||
case DBOI_UPDATECOUNTER:
|
||||
if( pTag )
|
||||
{
|
||||
/* refresh update counter */
|
||||
if( hb_cdxIndexLockRead( pTag->pIndex ) )
|
||||
hb_cdxIndexUnLockRead( pTag->pIndex );
|
||||
pOrderInfo->itmResult = hb_itemPutNInt( pOrderInfo->itmResult,
|
||||
pTag->pIndex->ulVersion );
|
||||
}
|
||||
else
|
||||
pOrderInfo->itmResult = hb_itemPutNI( pOrderInfo->itmResult, 0 );
|
||||
break;
|
||||
|
||||
case DBOI_SHARED:
|
||||
pOrderInfo->itmResult = hb_itemPutL( pOrderInfo->itmResult,
|
||||
pTag && pTag->pIndex->fShared );
|
||||
break;
|
||||
|
||||
case DBOI_ISREADONLY:
|
||||
pOrderInfo->itmResult = hb_itemPutL( pOrderInfo->itmResult,
|
||||
pTag && pTag->pIndex->fReadonly );
|
||||
break;
|
||||
|
||||
case DBOI_ISMULTITAG:
|
||||
case DBOI_ISSORTRECNO:
|
||||
pOrderInfo->itmResult = hb_itemPutL( pOrderInfo->itmResult, pTag != NULL );
|
||||
break;
|
||||
|
||||
case DBOI_LARGEFILE:
|
||||
pOrderInfo->itmResult = hb_itemPutL( pOrderInfo->itmResult, FALSE );
|
||||
break;
|
||||
|
||||
default:
|
||||
return SUPER_ORDINFO( ( AREAP ) pArea, uiIndex, pOrderInfo );
|
||||
|
||||
@@ -8347,10 +8467,11 @@ static ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, P
|
||||
break;
|
||||
}
|
||||
|
||||
case RDDI_MULTIKEY:
|
||||
case RDDI_MULTITAG:
|
||||
case RDDI_SORTRECNO:
|
||||
case RDDI_STRUCTORD:
|
||||
case RDDI_MULTIKEY:
|
||||
case RDDI_STRICTSTRUCT:
|
||||
hb_itemPutL( pItem, TRUE );
|
||||
break;
|
||||
|
||||
|
||||
@@ -6532,6 +6532,21 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo
|
||||
|
||||
switch( uiIndex )
|
||||
{
|
||||
case DBOI_STRICTREAD:
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_STRICTREAD, 0, pInfo->itmResult );
|
||||
case DBOI_OPTIMIZE:
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_OPTIMIZE, 0, pInfo->itmResult );
|
||||
case DBOI_AUTOOPEN:
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_AUTOOPEN, 0, pInfo->itmResult );
|
||||
case DBOI_AUTOORDER:
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_AUTOORDER, 0, pInfo->itmResult );
|
||||
case DBOI_AUTOSHARE:
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_AUTOSHARE, 0, pInfo->itmResult );
|
||||
case DBOI_BAGEXT:
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_ORDBAGEXT, 0, pInfo->itmResult );
|
||||
@@ -6733,6 +6748,7 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo
|
||||
break;
|
||||
case DBOI_POSITION:
|
||||
case DBOI_KEYNORAW:
|
||||
/* case DBOI_RECNO: */
|
||||
if( hb_itemType( pInfo->itmNewVal ) & HB_IT_NUMERIC )
|
||||
hb_itemPutL( pInfo->itmResult,
|
||||
hb_ntxOrdKeyGoto( pTag, hb_itemGetNL( pInfo->itmNewVal ) ) );
|
||||
@@ -7028,6 +7044,7 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo
|
||||
switch( uiIndex )
|
||||
{
|
||||
case DBOI_KEYCOUNT:
|
||||
case DBOI_KEYCOUNTRAW:
|
||||
{
|
||||
ULONG ulRecCount = 0;
|
||||
SELF_RECCOUNT( ( AREAP ) pArea, &ulRecCount );
|
||||
@@ -7035,6 +7052,8 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo
|
||||
break;
|
||||
}
|
||||
case DBOI_POSITION:
|
||||
case DBOI_KEYNORAW:
|
||||
/* case DBOI_RECNO: */
|
||||
if( pInfo->itmNewVal && hb_itemType( pInfo->itmNewVal ) & HB_IT_NUMERIC )
|
||||
hb_itemPutL( pInfo->itmResult, SELF_GOTO( ( AREAP ) pArea,
|
||||
hb_itemGetNL( pInfo->itmNewVal ) ) == SUCCESS );
|
||||
@@ -7146,8 +7165,16 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo
|
||||
case DBOI_FILEHANDLE:
|
||||
hb_itemPutNInt( pInfo->itmResult, FS_ERROR );
|
||||
break;
|
||||
default:
|
||||
case DBOI_BAGNAME:
|
||||
case DBOI_CONDITION:
|
||||
case DBOI_EXPRESSION:
|
||||
case DBOI_FULLPATH:
|
||||
case DBOI_NAME:
|
||||
case DBOI_KEYTYPE:
|
||||
hb_itemPutC( pInfo->itmResult, "" );
|
||||
break;
|
||||
default:
|
||||
hb_itemClear( pInfo->itmResult );
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
|
||||
@@ -77,7 +77,7 @@ FUNCTION __dbCopyXStruct( cFileName )
|
||||
__dbCreate( cFileName, NIL, NIL, .F., NIL )
|
||||
|
||||
AEval( aStruct, {| aField | iif( aField[ DBS_TYPE ] == "C" .AND. aField[ DBS_LEN ] > 255,;
|
||||
( aField[ DBS_DEC ] := Int( aField[ DBS_LEN ] / 256 ), aField[ DBS_LEN ] := aField[ DBS_LEN ] % 256 ), NIL ),;
|
||||
( aField[ DBS_DEC ] := Int( aField[ DBS_LEN ] / 256 ), aField[ DBS_LEN ] := aField[ DBS_LEN ] % 256 ), ),;
|
||||
dbAppend(),;
|
||||
FIELD->FIELD_NAME := aField[ DBS_NAME ],;
|
||||
FIELD->FIELD_TYPE := aField[ DBS_TYPE ],;
|
||||
|
||||
@@ -522,7 +522,7 @@ HB_FUNC( HB_REGEX )
|
||||
/* Returns just .T. if match found or .F. otherwise. */
|
||||
HB_FUNC( HB_REGEXMATCH )
|
||||
{
|
||||
hb_retl( hb_regex( hb_parl( 3 ) ? 1 : 2 ) );
|
||||
hb_retl( hb_regex( hb_parl( 3 ) ? 1 /* LIKE */ : 2 /* HAS */ ) );
|
||||
}
|
||||
|
||||
/* Splits the string in an array of matched expressions */
|
||||
|
||||
@@ -159,7 +159,7 @@ CLASS TBrowse
|
||||
METHOD Invalidate() // Forces entire redraw during next stabilization
|
||||
METHOD RefreshAll() // Causes all data to be recalculated during the next stabilize
|
||||
METHOD RefreshCurrent() INLINE; // Causes the current row to be refilled and repainted on next stabilize
|
||||
If( ! Empty( ::aRedraw ), ::aRedraw[ ::RowPos ] := .T., Nil ), ::stable := .F., Self
|
||||
If( ! Empty( ::aRedraw ), ::aRedraw[ ::RowPos ] := .T., ), ::stable := .F., Self
|
||||
METHOD Stabilize() // Performs incremental stabilization
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
|
||||
@@ -318,7 +318,11 @@ HB_EXPORT PHB_ITEM hb_hashNew( PHB_ITEM pItem )
|
||||
pBaseHash->pPairs = NULL;
|
||||
pBaseHash->ulSize = 0;
|
||||
pBaseHash->ulLen = 0;
|
||||
#ifdef HB_COMPAT_XHB
|
||||
pBaseHash->iFlags = HB_HASH_AUTOADD;
|
||||
#else
|
||||
pBaseHash->iFlags = 0;
|
||||
#endif
|
||||
pBaseHash->pDefault = NULL;
|
||||
|
||||
pItem->type = HB_IT_HASH;
|
||||
|
||||
@@ -766,7 +766,7 @@ STATIC FUNCTION HB_TString()
|
||||
oClass:AddInline( "+" , {| self, cTest | ::cValue + cTest } )
|
||||
oClass:AddInline( "-" , {| self, cTest | ::cValue - cTest } )
|
||||
oClass:AddInline( "++" , {| self | ::cValue += " ", self } )
|
||||
oClass:AddInline( "--" , {| self | iif( Len( ::cValue ) > 0, ::cValue := Left( ::cValue, Len( ::cValue ) - 1 ), ::cValue ), self } )
|
||||
oClass:AddInline( "--" , {| self | iif( Len( ::cValue ) > 0, ::cValue := Left( ::cValue, Len( ::cValue ) - 1 ), ), self } )
|
||||
oClass:AddInline( "$" , {| self, cTest | ::cValue $ cTest } )
|
||||
oClass:AddInline( "*" , {| self, nVal | Replicate( ::cValue, nVal ) } )
|
||||
oClass:AddInline( "/" , {| self, nVal | Left( ::cValue, Len( ::cValue ) / nVal ) } )
|
||||
|
||||
Reference in New Issue
Block a user