From eeb38e90e7d49aded614dc05ea701cfdfe765010 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sun, 15 Apr 2007 23:50:24 +0000 Subject: [PATCH] 2007-04-16 01:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/debug/debugger.prg * removed some not longer necessary GTWVW extensions * harbour/source/rtl/hbgtcore.c * harbour/contrib/libct/ctwin.c + added support for GTI_{NEW,GET,SET}WIN in CTWIN Now debugger can be used with CTWIN without any problems --- harbour/ChangeLog | 9 +++++++++ harbour/contrib/libct/ctwin.c | 33 +++++++++++++++++++++++++++++++ harbour/source/debug/debugger.prg | 22 ++------------------- harbour/source/rtl/hbgtcore.c | 4 ++-- 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a95354e333..fadbe3991a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-04-16 01:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/debug/debugger.prg + * removed some not longer necessary GTWVW extensions + + * harbour/source/rtl/hbgtcore.c + * harbour/contrib/libct/ctwin.c + + added support for GTI_{NEW,GET,SET}WIN in CTWIN + Now debugger can be used with CTWIN without any problems + 2007-04-16 00:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/common.mak * harbour/bin/pack_src.sh diff --git a/harbour/contrib/libct/ctwin.c b/harbour/contrib/libct/ctwin.c index 61fae6b7f1..12b1340b4c 100644 --- a/harbour/contrib/libct/ctwin.c +++ b/harbour/contrib/libct/ctwin.c @@ -1366,6 +1366,39 @@ static BOOL hb_ctw_gt_Info( int iType, PHB_GT_INFO pInfo ) pInfo->pResult = hb_itemPutL( pInfo->pResult, TRUE ); break; + case GTI_NEWWIN: + { + BOOL fResult; + + hb_ctw_SelectWindow( 0 ); + fResult = HB_GTSUPER_INFO( iType, pInfo ); + + if( fResult && hb_arrayLen( pInfo->pResult ) >= 8 ) + hb_itemPutNI( hb_arrayGetItemPtr( pInfo->pResult, 8 ), + s_iCurrWindow ); + return fResult; + } + case GTI_GETWIN: + { + BOOL fResult; + int iWindow = s_iCurrWindow; + + hb_ctw_SelectWindow( 0 ); + fResult = HB_GTSUPER_INFO( iType, pInfo ); + if( fResult && hb_arrayLen( pInfo->pResult ) >= 8 ) + hb_itemPutNI( hb_arrayGetItemPtr( pInfo->pResult, 8 ), iWindow ); + return fResult; + } + case GTI_SETWIN: + { + BOOL fResult; + + hb_ctw_SelectWindow( 0 ); + fResult = HB_GTSUPER_INFO( iType, pInfo ); + if( hb_arrayLen( pInfo->pNewVal ) == 8 ) + hb_ctw_SelectWindow( hb_arrayGetNI( pInfo->pNewVal, 8 ) ); + return fResult; + } default: return HB_GTSUPER_INFO( iType, pInfo ); } diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index fa4ec8181d..f840c75067 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -129,14 +129,11 @@ * The dimension of the debugger window -//#IFDEF __GTWVW__ #define DEBUGGER_MINROW 0 #define DEBUGGER_MINCOL 0 #define DEBUGGER_MAXROW 22 #define DEBUGGER_MAXCOL 77 -//#ENDIF - static s_oDebugger @@ -215,9 +212,6 @@ CLASS TDebugger DATA lRunAtStartup DATA lLineNumbers INIT .T. - //x for gtwvw: - DATA cGTVersion INIT ' ' - METHOD New() METHOD Activate() @@ -397,20 +391,8 @@ METHOD New() CLASS TDebugger ::lGo := ::lRunAtStartup /* Store the initial screen dimensions for now */ - #ifdef __XHARBOUR__ - if hb_gt_Version() == 'WVW' .and. ; - !( type( 'WVW_NOPENWINDOW()' ) == 'U' .OR. Type( 'WVW_NSETCURWINDOW()' ) == 'U' ) - ::cGTVersion := 'WVW' - ::nMaxRow := DEBUGGER_MAXROW - ::nMaxCol := DEBUGGER_MAXCOL - else - ::nMaxRow := MaxRow() - ::nMaxCol := MaxCol() - endif - #else - ::nMaxRow := MaxRow() - ::nMaxCol := MaxCol() - #endif + ::nMaxRow := MaxRow() + ::nMaxCol := MaxCol() ::oPullDown := __dbgBuildMenu( Self ) diff --git a/harbour/source/rtl/hbgtcore.c b/harbour/source/rtl/hbgtcore.c index b0951e48df..d2725ac774 100644 --- a/harbour/source/rtl/hbgtcore.c +++ b/harbour/source/rtl/hbgtcore.c @@ -1499,7 +1499,7 @@ static BOOL hb_gt_def_Info( int iType, PHB_GT_INFO pInfo ) if( !pInfo->pResult ) pInfo->pResult = hb_itemNew( NULL ); - hb_arrayNew( pInfo->pResult, 7 ); + hb_arrayNew( pInfo->pResult, 8 ); hb_gt_GetPos( &iRow, &iCol ); hb_itemPutNI( hb_arrayGetItemPtr( pInfo->pResult, 1 ), iRow ); hb_itemPutNI( hb_arrayGetItemPtr( pInfo->pResult, 2 ), iCol ); @@ -1522,7 +1522,7 @@ static BOOL hb_gt_def_Info( int iType, PHB_GT_INFO pInfo ) break; } case GTI_SETWIN: /* restore screen buffer, cursor shape and possition */ - if( hb_arrayLen( pInfo->pNewVal ) == 7 ) + if( hb_arrayLen( pInfo->pNewVal ) == 8 ) { hb_gt_DispBegin(); if( hb_arrayGetCLen( pInfo->pNewVal, 7 ) > 0 )