From 791ea336213e93f2e54e16ed07f64a61c74d46a8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 3 Oct 1999 02:08:58 +0000 Subject: [PATCH] 19991003-03:52 GMT+1 --- harbour/ChangeLog | 20 ++++++++++++++++ harbour/funclist.txt | 2 +- harbour/source/debug/debugger.prg | 33 ++++++++++++++++----------- harbour/source/rdd/dbfntx/dbfntx0.prg | 1 + harbour/source/rtl/achoice.prg | 2 +- harbour/source/rtl/harbinit.prg | 4 +++- harbour/source/rtl/tget.prg | 11 ++++++--- harbour/source/rtl/tgetlist.prg | 9 +++++--- harbour/tests/working/rtl_test.prg | 4 ++-- 9 files changed, 62 insertions(+), 24 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b5daa2d493..4cb20b7a1a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,23 @@ +19991003-03:52 GMT+1 Victor Szel + ; Modifications after a test build with the harbour /w2 switch: + * tests/working/rtl_test.prg + + QUESTION added about __FLAGSHIP__ and __VO__ constant names. + * source/rtl/tgetlist.prg + funclist.txt + ! ReadModal() was buggy when a reader codeblock existed. Fixed. + ! ReadExit() converted to function from a method, this way it's Clipper + compatible, plus an unused variable warning has been fixed. + * source/rtl/tget.prg + ! _GET_/__GET was not assigning the passed VALID and WHEN blocks to the + get object, this has been fixed, but not tested. + * source/rtl/achoice.prg + source/rtl/harbinit.prg + source/rtl/tget.prg + source/rtl/tgetlist.prg + source/rdd/dbfntx/dbfntx0.prg (missing #include) + source/debug/debugger.prg (mistyped and undeclared variables) + ! /w2 warnings fixed. + 19991002-22:45 GMT+1 Victor Szel * include/extend.h source/rtl/strings.c diff --git a/harbour/funclist.txt b/harbour/funclist.txt index 084ed9d918..dfa41723c8 100644 --- a/harbour/funclist.txt +++ b/harbour/funclist.txt @@ -191,7 +191,7 @@ RDDLIST ;R; RDDNAME ;R; RDDREGISTER ;R; RDDSETDEFAULT ;R; -READEXIT ;N; +READEXIT ;R; READINSERT ;N; READKEY ;N; READMODAL ;N; diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index d22863da09..8644b37ebf 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -179,6 +179,7 @@ return nil METHOD HandleEvent() CLASS TDebugger local nPopup, oWnd + local nKey ::lEnd = .f. @@ -469,7 +470,7 @@ return If( LastKey() != K_ESC, uTemp, uValue ) METHOD IsBreakPoint( nLine ) CLASS TDebugger -return AScan( ::aBreakPoints, { | aBreak, n | aBreak[ 1 ] == nLine } ) != 0 +return AScan( ::aBreakPoints, { | aBreak | aBreak[ 1 ] == nLine } ) != 0 METHOD GotoLine( nLine ) CLASS TDebugger @@ -511,7 +512,7 @@ return nil METHOD ToggleBreakPoint() CLASS TDebugger - local nAt := AScan( ::aBreakPoints, { | aBreak, n | aBreak[ 1 ] == ; + local nAt := AScan( ::aBreakPoints, { | aBreak | aBreak[ 1 ] == ; ::oBrwText:nLine } ) if nAt == 0 @@ -619,22 +620,22 @@ METHOD Move() Class TDbWindow nkey=inkey(0) do case case nkey==K_UP - if(::ntop !=0,(::ntop--,::nbottom--),nil) + if(::ntop != 0,(::ntop--,::nbottom--),nil) case nkey==K_DOWN - if(::nbottom !=maxrow(),(::ntop++,::nbottom++),nil) + if(::nbottom != maxrow(),(::ntop++,::nbottom++),nil) case nkey==K_LEFT - if(::nleft!=0,(::nleft--,::nright--),nil) + if(::nleft != 0,(::nleft--,::nright--),nil) case nkey==K_RIGHT - if(::nbottom !=maxrow(),(::nleft++,::nright++),nil) + if(::nbottom != maxrow(),(::nleft++,::nright++),nil) case nkey==K_ESC - ::ntop:=noldtop - ::nleft:=nolfleft - ::nbottom:=noldbottom - ::nright:=noldright + ::ntop := noldtop + ::nleft := noldleft + ::nbottom := noldbottom + ::nright := noldright endcase if ( nkey==K_ESC .or. nkey==K_ENTER) @@ -688,7 +689,7 @@ ENDCLASS METHOD New() CLASS TDbMenu - local n, nCol := 0 + local nCol := 0 if ::aMenus == nil ::aMenus = {} @@ -770,6 +771,7 @@ return nil METHOD ClosePopup( nPopup ) CLASS TDbMenu local oPopup + local nAt // dispbegin() if nPopup != 0 @@ -872,6 +874,7 @@ return nil METHOD GoLeft() CLASS TDbMenu local oMenuItem := ::aItems[ ::nOpenPopup ] + local nAt // DispBegin() if ::nOpenPopup != 0 @@ -904,6 +907,7 @@ return nil METHOD GoRight() CLASS TDbMenu local oMenuItem := ::aItems[ ::nOpenPopup ] + local nAt // DispBegin() if ::nOpenPopup != 0 @@ -947,7 +951,7 @@ return nil METHOD ShowPopup( nPopup ) CLASS TDbMenu - local nAt, oPopup, oMenuItem + local nAt, oMenuItem if ! ::lPopup @ 0, ::aItems[ nPopup ]:nCol SAY ; @@ -976,7 +980,7 @@ return nil METHOD ProcessKey( nKey ) CLASS TDbMenu - local nPopuo + local nPopup do case case nKey == K_ESC @@ -1032,6 +1036,8 @@ return Self METHOD Display( cClrText, cClrHotKey ) CLASS TDbMenuItem + local nAt + @ ::nRow, ::nCol SAY ; StrTran( ::cPrompt, "&", "" ) COLOR cClrText @@ -1048,6 +1054,7 @@ static function AltToKey( nKey ) K_ALT_M, K_ALT_N, K_ALT_O, K_ALT_P, K_ALT_Q, K_ALT_R,; K_ALT_S, K_ALT_T, K_ALT_U, K_ALT_V, K_ALT_W, K_ALT_X,; K_ALT_Y, K_ALT_Z }, nKey ) + local cKey if nIndex > 0 cKey := SubStr( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", nIndex, 1 ) diff --git a/harbour/source/rdd/dbfntx/dbfntx0.prg b/harbour/source/rdd/dbfntx/dbfntx0.prg index 6ba5c4afdc..0979c1a00b 100644 --- a/harbour/source/rdd/dbfntx/dbfntx0.prg +++ b/harbour/source/rdd/dbfntx/dbfntx0.prg @@ -33,6 +33,7 @@ * */ +#include "error.ch" #include "rddsys.ch" ANNOUNCE DBFNTX diff --git a/harbour/source/rtl/achoice.prg b/harbour/source/rtl/achoice.prg index 7f6d4f4f51..8802e865f1 100644 --- a/harbour/source/rtl/achoice.prg +++ b/harbour/source/rtl/achoice.prg @@ -133,7 +133,7 @@ function achoice( nTop, nLft, nBtm, nRyt, acItems, xSelect, xUserFunc, nPos, nHi nNumCols := nRyt - nLft + 1 nNumRows := nBtm - nTop + 1 - aeval( acItems, { | x, n | if( ISCHARACTER( x ), aadd( acCopy, padr( x, nNumCols ) ), .F. ) } ) + aeval( acItems, { | x | if( ISCHARACTER( x ), aadd( acCopy, padr( x, nNumCols ) ), .F. ) } ) nItems := len( acCopy ) alSelect := array( nItems ) diff --git a/harbour/source/rtl/harbinit.prg b/harbour/source/rtl/harbinit.prg index 4ba6849348..857115517f 100644 --- a/harbour/source/rtl/harbinit.prg +++ b/harbour/source/rtl/harbinit.prg @@ -39,7 +39,9 @@ ANNOUNCE SysInit INIT PROCEDURE ClipInit - PUBLIC getlist := {} + MEMVAR GetList + + PUBLIC GetList := {} ErrorSys() diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index a746dc14f0..4f1d9f00ff 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -784,11 +784,16 @@ return TGet():New( nRow, nCol, bVarBlock, cVarName, cPicture, cColor ) //---------------------------------------------------------------------------// function __GET( uVar, cVarName, cPicture, bValid, bWhen, bSetGet ) - -return TGet():New(,, bSetGet, cVarName, cPicture ) + return _GET_( uVar, cVarName, cPicture, bValid, bWhen, bSetGet ) function _GET_( uVar, cVarName, cPicture, bValid, bWhen, bSetGet ) + local oGet := TGet():New(,, bSetGet, cVarName, cPicture ) -return TGet():New(,, bSetGet, cVarName, cPicture ) + uVar := uVar // Suppress unused variable warning + + oGet:bPreBlock := bWhen + oGet:bPostBlock := bValid + + return oGet //---------------------------------------------------------------------------// diff --git a/harbour/source/rtl/tgetlist.prg b/harbour/source/rtl/tgetlist.prg index 11bc70e55b..622583e0ca 100644 --- a/harbour/source/rtl/tgetlist.prg +++ b/harbour/source/rtl/tgetlist.prg @@ -66,7 +66,7 @@ function ReadModal( GetList, nPos ) oGetList:PostActiveGet() if ISBLOCK( oGetList:oGet:Reader ) - Eval( oGet:Reader, oGetList:oGet ) + Eval( oGetList:oGet:Reader, oGetList:oGet ) else oGetList:Reader() endif @@ -105,7 +105,6 @@ CLASS TGetList METHOD GetActive( oGet ) METHOD ShowScoreBoard() METHOD ReadVar( cNewVarName ) - METHOD ReadExit( lNew ) INLINE Set( _SET_EXIT, lNew ) ENDCLASS @@ -155,7 +154,7 @@ METHOD GetApplyKey( nKey ) CLASS TGetList if ! ( ( bKeyBlock := Setkey( nKey ) ) == nil ) ::GetDoSetKey( bKeyBlock ) - return + return nil endif do case @@ -495,3 +494,7 @@ METHOD ReadVar( cNewVarName ) CLASS TGetList endif return cOldName + +FUNCTION ReadExit( lExit ) + RETURN Set( _SET_EXIT, lExit ) + diff --git a/harbour/tests/working/rtl_test.prg b/harbour/tests/working/rtl_test.prg index 2081391944..8c7ea7bf1e 100644 --- a/harbour/tests/working/rtl_test.prg +++ b/harbour/tests/working/rtl_test.prg @@ -54,8 +54,8 @@ #ifndef __HARBOUR__ #ifndef __XPP__ - #ifndef __FLAGSHIP__ - #ifndef __VO__ + #ifndef __FLAGSHIP__ /* QUESTION: is this the correct constant ? */ + #ifndef __VO__ /* QUESTION: is this the correct constant ? */ #define __CLIPPER__ #endif #endif