2008-09-22 20:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/classes.c
* harbour/source/rdd/workarea.c
* pacified BCC warnings
* harbour/source/debug/dbgwa.prg
* harbour/source/debug/debugger.prg
* harbour/source/debug/dbghelp.prg
* eliminated two static variables
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2008-09-22 20:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/vm/classes.c
|
||||
* harbour/source/rdd/workarea.c
|
||||
* pacified BCC warnings
|
||||
|
||||
* harbour/source/debug/dbgwa.prg
|
||||
* harbour/source/debug/debugger.prg
|
||||
* harbour/source/debug/dbghelp.prg
|
||||
* eliminated two static variables
|
||||
|
||||
2008-09-22 14:34 UTC-0300 Antonio Carlos Pantaglione <toninho@fwi.com.br>
|
||||
% source/rtl/dbedit.prg
|
||||
% source/rtl/dirscan.prg
|
||||
|
||||
@@ -175,8 +175,7 @@ STATIC PROCEDURE ProcessKey( nKey, oDlg, oBrw, aTopics )
|
||||
|
||||
STATIC PROCEDURE ShowTopic( oDlg, aTopics, nTopic, nPageOp )
|
||||
|
||||
STATIC s_nPage
|
||||
|
||||
local oDebug := __Dbg()
|
||||
LOCAL nRows := oDlg:nBottom - oDlg:nTop - 1
|
||||
LOCAL nPages := Len( aTopics[ nTopic ][ 2 ] ) / nRows
|
||||
LOCAL nRowsToPaint
|
||||
@@ -190,25 +189,25 @@ STATIC PROCEDURE ShowTopic( oDlg, aTopics, nTopic, nPageOp )
|
||||
IF nPageOp == -1 .OR. nPageOp == 1
|
||||
RETURN
|
||||
ENDIF
|
||||
s_nPage := 1
|
||||
oDebug:nHelpPage := 1
|
||||
ELSE
|
||||
DO CASE
|
||||
CASE nPageOp == 0 // Show first page
|
||||
|
||||
s_nPage := 1
|
||||
oDebug:nHelpPage := 1
|
||||
|
||||
CASE nPageOp == 1 // Show next page
|
||||
|
||||
IF s_nPage < nPages
|
||||
s_nPage++
|
||||
IF oDebug:nHelpPage < nPages
|
||||
oDebug:nHelpPage++
|
||||
ELSE
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
CASE nPageOp == -1 // Show prev page
|
||||
|
||||
IF s_nPage > 1
|
||||
s_nPage--
|
||||
IF oDebug:nHelpPage > 1
|
||||
oDebug:nHelpPage--
|
||||
ELSE
|
||||
RETURN
|
||||
ENDIF
|
||||
@@ -218,16 +217,16 @@ STATIC PROCEDURE ShowTopic( oDlg, aTopics, nTopic, nPageOp )
|
||||
|
||||
Scroll( oDlg:nTop + 1, oDlg:nLeft + 14, oDlg:nBottom - 1, oDlg:nRight - 1 )
|
||||
|
||||
nRowsToPaint := Min( nRows, Len( aTopics[ nTopic ][ 2 ] ) - ( ( s_nPage - 1 ) * nRows ) )
|
||||
nRowsToPaint := Min( nRows, Len( aTopics[ nTopic ][ 2 ] ) - ( ( oDebug:nHelpPage - 1 ) * nRows ) )
|
||||
|
||||
FOR n := 1 TO nRowsToPaint
|
||||
DispOutAt( 2 + n, 16, aTopics[ nTopic ][ 2 ][ ( ( s_nPage - 1 ) * nRows ) + n ] )
|
||||
DispOutAt( 2 + n, 16, aTopics[ nTopic ][ 2 ][ ( ( oDebug:nHelpPage - 1 ) * nRows ) + n ] )
|
||||
NEXT
|
||||
|
||||
IF Len( aTopics[ nTopic ][ 2 ] ) <= nRows
|
||||
DispOutAt( oDlg:nBottom, oDlg:nRight - 16, " Page 1 of 1 " )
|
||||
ELSE
|
||||
DispOutAt( oDlg:nBottom, oDlg:nRight - 16, " Page " + Str( s_nPage, 1 ) + " of " + Str( nPages, 1 ) + " " )
|
||||
DispOutAt( oDlg:nBottom, oDlg:nRight - 16, " Page " + Str( oDebug:nHelpPage, 1 ) + " of " + Str( nPages, 1 ) + " " )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -215,25 +215,24 @@ return
|
||||
|
||||
static procedure DlgWorkAreaKey( nKey, oDlg, aBrw, aAlias, aStruc, aInfo )
|
||||
|
||||
static s_nFocus := 1
|
||||
|
||||
local oDebug := __Dbg()
|
||||
local nAlias
|
||||
|
||||
if nKey == K_TAB .or. nKey == K_SH_TAB
|
||||
aBrw[ s_nFocus ]:Dehilite()
|
||||
s_nFocus := s_nFocus + iif( nKey == K_TAB, 1, -1 )
|
||||
if s_nFocus < 1
|
||||
s_nFocus := 3
|
||||
aBrw[ oDebug:nWaFocus ]:Dehilite()
|
||||
oDebug:nWaFocus += iif( nKey == K_TAB, 1, -1 )
|
||||
if oDebug:nWaFocus < 1
|
||||
oDebug:nWaFocus := 3
|
||||
endif
|
||||
if s_nFocus > 3
|
||||
s_nFocus := 1
|
||||
if oDebug:nWaFocus > 3
|
||||
oDebug:nWaFocus := 1
|
||||
endif
|
||||
aBrw[ s_nFocus ]:Hilite()
|
||||
aBrw[ oDebug:nWaFocus ]:Hilite()
|
||||
return
|
||||
endif
|
||||
|
||||
do case
|
||||
case s_nFocus == 1
|
||||
case oDebug:nWaFocus == 1
|
||||
nAlias := aBrw[ 1 ]:Cargo
|
||||
WorkAreasKeyPressed( nKey, aBrw[ 1 ], Len( aAlias ) )
|
||||
if nAlias != aBrw[ 1 ]:Cargo
|
||||
@@ -257,9 +256,9 @@ static procedure DlgWorkAreaKey( nKey, oDlg, aBrw, aAlias, aStruc, aInfo )
|
||||
aBrw[ 3 ]:Dehilite()
|
||||
UpdateInfo( oDlg, aAlias[ aBrw[ 1 ]:Cargo ][ 2 ] )
|
||||
endif
|
||||
case s_nFocus == 2
|
||||
case oDebug:nWaFocus == 2
|
||||
WorkAreasKeyPressed( nKey, aBrw[ 2 ], Len( aInfo ) )
|
||||
case s_nFocus == 3
|
||||
case oDebug:nWaFocus == 3
|
||||
WorkAreasKeyPressed( nKey, aBrw[ 3 ], Len( aStruc ) )
|
||||
endcase
|
||||
|
||||
|
||||
@@ -230,6 +230,8 @@ CREATE CLASS HBDebugger
|
||||
VAR lPPO INIT .F.
|
||||
VAR lRunAtStartup INIT .T. // Clipper compatible
|
||||
VAR lLineNumbers INIT .T.
|
||||
VAR nHelpPage INIT 1
|
||||
VAR nWaFocus INIT 1
|
||||
|
||||
METHOD New()
|
||||
METHOD Activate()
|
||||
|
||||
@@ -2232,7 +2232,7 @@ HB_FUNC( __RDDPREALLOCATE )
|
||||
{
|
||||
LONG lNewSize = hb_parnl( 1 );
|
||||
|
||||
if( lNewSize > USHRT_MAX )
|
||||
if( lNewSize > ( LONG ) USHRT_MAX )
|
||||
lNewSize = USHRT_MAX;
|
||||
if( lNewSize > ( LONG ) s_uiRddMax )
|
||||
{
|
||||
@@ -2240,6 +2240,8 @@ HB_FUNC( __RDDPREALLOCATE )
|
||||
s_RddList = ( LPRDDNODE * )
|
||||
hb_xrealloc( s_RddList, sizeof( LPRDDNODE ) * s_uiRddMax );
|
||||
}
|
||||
|
||||
hb_retnl( s_uiRddMax );
|
||||
}
|
||||
|
||||
HB_FUNC_EXTERN( RDDSYS );
|
||||
|
||||
@@ -4523,14 +4523,21 @@ HB_FUNC( __CLSPREALLOCATE )
|
||||
{
|
||||
LONG lNewSize = hb_parnl( 1 );
|
||||
|
||||
if( lNewSize > USHRT_MAX )
|
||||
if( lNewSize > ( LONG ) USHRT_MAX )
|
||||
lNewSize = USHRT_MAX;
|
||||
|
||||
HB_CLASS_LOCK
|
||||
|
||||
if( lNewSize > ( LONG ) s_uiClsSize )
|
||||
{
|
||||
s_uiClsSize = ( USHORT ) lNewSize;
|
||||
s_pClasses = ( PCLASS * ) hb_xrealloc( s_pClasses, sizeof( PCLASS ) *
|
||||
( ( ULONG ) s_uiClsSize + 1 ) );
|
||||
}
|
||||
|
||||
HB_CLASS_UNLOCK
|
||||
|
||||
hb_retnl( s_uiClsSize );
|
||||
}
|
||||
|
||||
/* Real dirty function, though very usefull under certain circunstances:
|
||||
|
||||
Reference in New Issue
Block a user