From 5dcbeffc68c5346d4f562d8a597ed25dfb3ac9ab Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 21 Jun 2006 22:25:00 +0000 Subject: [PATCH] 2006-06-22 00:25 UTC+0100 Viktor Szakats (viktor.szakats syenar.hu) * harbour/include/common.ch * harbour/source/debug/dbghelp.prg * harbour/source/debug/dbgmenu.prg * harbour/source/debug/dbgtarr.prg * harbour/source/debug/dbgtobj.prg * harbour/source/debug/dbgwa.prg * harbour/source/debug/debugger.prg * harbour/source/rdd/dbupdat.prg * harbour/source/rtl/achoice.prg * harbour/source/rtl/checkbox.prg * harbour/source/rtl/dbedit.prg * harbour/source/rtl/getsys.prg * harbour/source/rtl/listbox.prg * harbour/source/rtl/persist.prg * harbour/source/rtl/pushbtn.prg * harbour/source/rtl/radiobtn.prg * harbour/source/rtl/tbcolumn.prg * harbour/source/rtl/tbrowse.prg * harbour/source/rtl/tclass.prg * harbour/source/rtl/teditor.prg * harbour/source/rtl/tget.prg * harbour/source/rtl/tgetlist.prg * harbour/source/rtl/tlabel.prg * harbour/source/rtl/treport.prg * harbour/utils/hbdoc/genchm.prg * harbour/utils/hbdoc/genhtm.prg * harbour/utils/hbdoc/genng.prg * harbour/utils/hbdoc/genos2.prg * harbour/utils/hbdoc/genrtf.prg * harbour/utils/hbdoc/gentrf.prg * harbour/utils/hbdoc/html.prg * harbour/utils/hbdoc/ng.prg * harbour/utils/hbdoc/os2.prg * harbour/utils/hbdoc/rtf.prg * harbour/utils/hbmake/checks.prg * harbour/utils/hbmake/hbmake.prg * harbour/utils/hbmake/hbmutils.prg * harbour/utils/hbmake/radios.prg * harbour/utils/hbtest/rt_hvm.prg + HB_SYMBOL_UNUSED() added for .prg code. It can suppress unused var warnings where applicable. The code won't generate any final pcodes, so it won't cause overhead. The only current downside is that it cannot be used inside codeblocks. ! Fixed a number (>200) of declared but unused variable /w2 error. All parts were scanned and fixed (except contrib). Note that there are several false "unreachable code" warnings, and there are still quite a few unused var warnings inside codeblocks. After fixing these /w2 switch could be added to the standard build process to maintain code quality. --- harbour/include/common.ch | 4 ++++ harbour/source/debug/dbghelp.prg | 6 +++-- harbour/source/debug/dbgmenu.prg | 2 +- harbour/source/debug/dbgtarr.prg | 15 ++++++------ harbour/source/debug/dbgtobj.prg | 11 +++++---- harbour/source/debug/dbgwa.prg | 5 ++++ harbour/source/debug/debugger.prg | 40 ++++++++++++------------------- harbour/source/rdd/dbupdat.prg | 1 - harbour/source/rtl/achoice.prg | 1 - harbour/source/rtl/checkbox.prg | 1 - harbour/source/rtl/dbedit.prg | 1 - harbour/source/rtl/getsys.prg | 10 +++++--- harbour/source/rtl/listbox.prg | 3 --- harbour/source/rtl/persist.prg | 21 ++++++++-------- harbour/source/rtl/pushbtn.prg | 2 +- harbour/source/rtl/radiobtn.prg | 8 ++++--- harbour/source/rtl/tbcolumn.prg | 2 -- harbour/source/rtl/tbrowse.prg | 35 ++++++++++++++------------- harbour/source/rtl/tclass.prg | 3 ++- harbour/source/rtl/teditor.prg | 1 - harbour/source/rtl/tget.prg | 2 -- harbour/source/rtl/tgetlist.prg | 39 +++++++++++++++++------------- harbour/source/rtl/tlabel.prg | 19 +++++++-------- harbour/source/rtl/treport.prg | 13 ++++------ harbour/utils/hbdoc/genchm.prg | 8 +++---- harbour/utils/hbdoc/genhtm.prg | 10 ++++---- harbour/utils/hbdoc/genng.prg | 17 ++++--------- harbour/utils/hbdoc/genos2.prg | 17 +++---------- harbour/utils/hbdoc/genrtf.prg | 23 +++--------------- harbour/utils/hbdoc/gentrf.prg | 1 + harbour/utils/hbdoc/html.prg | 1 - harbour/utils/hbdoc/ng.prg | 4 ---- harbour/utils/hbdoc/os2.prg | 7 ------ harbour/utils/hbdoc/rtf.prg | 2 ++ harbour/utils/hbmake/checks.prg | 4 ---- harbour/utils/hbmake/hbmake.prg | 8 ------- harbour/utils/hbmake/hbmutils.prg | 2 +- harbour/utils/hbmake/radios.prg | 2 -- harbour/utils/hbtest/rt_hvm.prg | 1 - 39 files changed, 143 insertions(+), 209 deletions(-) diff --git a/harbour/include/common.ch b/harbour/include/common.ch index 94b1a6552b..e6ee61c003 100644 --- a/harbour/include/common.ch +++ b/harbour/include/common.ch @@ -78,4 +78,8 @@ #command UPDATE IF TO => ; IF ; := ; END +/* To suppress unused variable /w2 warnings. The code snippet will be optimized + out by the compiler, so it won't cause any overhead. */ +#define HB_SYMBOL_UNUSED( symbol ) IF .F. ; symbol := symbol ; END + #endif /* HB_COMMON_CH_ */ diff --git a/harbour/source/debug/dbghelp.prg b/harbour/source/debug/dbghelp.prg index 05a02cc3d8..05e102fa90 100644 --- a/harbour/source/debug/dbghelp.prg +++ b/harbour/source/debug/dbghelp.prg @@ -60,7 +60,7 @@ function __dbgHelp( nTopic ) - local oDlg, n + local oDlg local cColor := If( __Dbg():lMonoDisplay, "N/W, W/N, W+/W, W+/N",; "N/W, N/BG, R/W, R/BG" ) local oBrw, aTopics := GetTopics() @@ -109,6 +109,8 @@ static procedure ProcessKey( nKey, oDlg, oBrw, aTopics, cColor ) local n, nSkip + HB_SYMBOL_UNUSED( cColor ) + do case case nKey == K_UP if oBrw:Cargo > 1 @@ -935,4 +937,4 @@ static function GetTopics() "preferences in INIT.CLD -- specifying colors,",; "turning on the CallStack window, and so on." } -return aTopics \ No newline at end of file +return aTopics diff --git a/harbour/source/debug/dbgmenu.prg b/harbour/source/debug/dbgmenu.prg index 8dfd7bc879..4e738c6418 100644 --- a/harbour/source/debug/dbgmenu.prg +++ b/harbour/source/debug/dbgmenu.prg @@ -67,7 +67,7 @@ function __dbgBuildMenu( oDebugger ) // Builds the debugger pulldown menu local oLineNumbers local oCaseSensitive local oMonoDisplay - local oPublic, oPrivate, oStatic, oLocal, oAll, oSort + local oPublic, oPrivate, oStatic, oLocal, oAll local oCallStack local oCBTrace local oPPo diff --git a/harbour/source/debug/dbgtarr.prg b/harbour/source/debug/dbgtarr.prg index 7f46072b58..945264d157 100644 --- a/harbour/source/debug/dbgtarr.prg +++ b/harbour/source/debug/dbgtarr.prg @@ -129,14 +129,14 @@ Local owndsets return self -method SetsKeyPressed( nKey, oBrwSets, nSets, oWnd ,cName,LenArr,aArray) Class TDBGArray +method SetsKeyPressed( nKey, oBrwSets, nSets, oWnd, cName, LenArr, aArray ) Class TDBGArray local nSet := oBrwSets:cargo[1] - local cTemp:=str(nSet,4) - local cOldname:= ::arrayName - Local nPos + local cTemp := str(nSet, 4) + local cOldname := ::arrayName + + HB_SYMBOL_UNUSED( nSets ) - local nRecsToSkip do case case nKey == K_UP oBrwSets:Up() @@ -307,8 +307,9 @@ static procedure RefreshVarsS( oBrowse ) endif oBrowse:hilite() return -static function ArrayBrowseSkip( nPos, oBrwSets,n ) + +static function ArrayBrowseSkip( nPos, oBrwSets ) return iif( oBrwSets:cargo[ 1 ] + nPos < 1, 0 - oBrwSets:cargo[ 1 ] + 1 , ; iif( oBrwSets:cargo[ 1 ] + nPos > Len(oBrwSets:cargo[ 2 ][ 1 ]), ; - Len(oBrwSets:cargo[ 2 ][ 1 ]) - oBrwSets:cargo[ 1 ], nPos ) ) \ No newline at end of file + Len(oBrwSets:cargo[ 2 ][ 1 ]) - oBrwSets:cargo[ 1 ], nPos ) ) diff --git a/harbour/source/debug/dbgtobj.prg b/harbour/source/debug/dbgtobj.prg index c75a1d7e11..8680e2f61b 100644 --- a/harbour/source/debug/dbgtobj.prg +++ b/harbour/source/debug/dbgtobj.prg @@ -167,12 +167,15 @@ Local owndsets return self -method SetsKeyPressed( nKey, oBrwSets, nSets, oWnd ,cName,LenArr,aArray) class tdbgObject +method SetsKeyPressed( nKey, oBrwSets, nSets, oWnd, cName, LenArr, aArray ) class tdbgObject local nSet := oBrwSets:Cargo - local cTemp:=str(nSet,4) - local cOldname:= ::objname - Local nPos + local cTemp := str(nSet, 4) + local cOldname := ::objname + + HB_SYMBOL_UNUSED( oWnd ) + HB_SYMBOL_UNUSED( cName ) + HB_SYMBOL_UNUSED( LenArr ) do case case nKey == K_UP diff --git a/harbour/source/debug/dbgwa.prg b/harbour/source/debug/dbgwa.prg index 811619a8c9..56b8964d16 100644 --- a/harbour/source/debug/dbgwa.prg +++ b/harbour/source/debug/dbgwa.prg @@ -50,6 +50,7 @@ * */ +#include "common.ch" #include "setcurs.ch" #include "inkey.ch" @@ -60,6 +61,8 @@ function __dbgShowWorkAreas( oDebugger ) local cColor local n1, n2, n3, cur_id + HB_SYMBOL_UNUSED( oDebugger ) + aAlias := {} aBrw := Array(3) n1 := 1 @@ -274,6 +277,8 @@ return nil static procedure WorkAreasKeyPressed( nKey, oBrw, oDlg, nTotal ) + HB_SYMBOL_UNUSED( oDlg ) + do case case nKey == K_UP if oBrw:Cargo > 1 diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index 4fafd04e10..facc8a9b30 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -790,9 +790,7 @@ RETURN NIL METHOD CommandWindowProcessKey( nKey ) CLASS TDebugger - local cCommand, cResult, oE - local bLastHandler - local lDisplay + local cCommand do case case nKey == K_UP @@ -1155,7 +1153,7 @@ METHOD EditVar( nVar ) CLASS TDebugger local cVarName := ::aVars[ nVar ][ 1 ] local uVarValue := ::aVars[ nVar ][ 2 ] local cVarType := ::aVars[ nVar ][ 3 ] - local aArray +// local aArray local cVarStr uVarValue := ::VarGetValue( ::aVars[ nVar ] ) @@ -1502,7 +1500,6 @@ return nil METHOD ShowCallStack() CLASS TDebugger local n := 1 - local oCol ::lShowCallStack = .t. @@ -1582,7 +1579,6 @@ return nil METHOD LoadVars() CLASS TDebugger // updates monitored variables local nCount, n, m, xValue, cName - local cStaticName, nStaticIndex, nStaticsBase LOCAL aVars LOCAL aBVars @@ -1835,7 +1831,7 @@ return nil //METHOD ShowCodeLine( nLine, cPrgName ) CLASS TDebugger METHOD ShowCodeLine( nProc ) CLASS TDebugger -LOCAL nPos, nLevel +LOCAL nPos LOCAL nLine, cPrgName // we only update the stack window and up a new browse @@ -1903,10 +1899,7 @@ return nil METHOD Open() CLASS TDebugger - LOCAL cFileName := ::InputBox( "Please enter the filename", Space( 255 ) ) - LOCAL cPrgName - - cFileName:= ALLTRIM( cFileName ) + LOCAL cFileName := AllTrim( ::InputBox( "Please enter the filename", Space( 255 ) ) ) if !EMPTY(cFileName) .AND. (cFileName != ::cPrgName .OR. valtype(::cPrgName)=='U') if ! File( cFileName ) .and. ! Empty( ::cPathForFiles ) @@ -2224,8 +2217,6 @@ return nil METHOD RestoreSettings() CLASS TDebugger - local n - ::cSettingsFileName := ::InputBox( "File name", ::cSettingsFileName ) if LastKey() != K_ESC @@ -2459,11 +2450,9 @@ return nil static procedure SetsKeyPressed( nKey, oBrwSets, nSets, oWnd, cCaption, bEdit ) - local nSet := oBrwSets:cargo[1] - local cTemp:=str(nSet,4) + local cTemp := str(nSet, 4) - Local nRectoMove do case case nKey == K_UP oBrwSets:Up() @@ -2487,16 +2476,20 @@ static procedure SetsKeyPressed( nKey, oBrwSets, nSets, oWnd, cCaption, bEdit ) endif endcase - RefreshVarsS(oBrwSets) - oWnd:SetCaption( cCaption + "[" + AllTrim( Str( oBrwSets:Cargo[1] ) ) + ; - ".." + AllTrim( Str( nSets ) ) + "]" ) + RefreshVarsS(oBrwSets) + + oWnd:SetCaption( cCaption + "[" + AllTrim( Str( oBrwSets:Cargo[1] ) ) + ; + ".." + AllTrim( Str( nSets ) ) + "]" ) return static procedure SetsKeyVarPressed( nKey, oBrwSets, nSets, oWnd, bEdit ) - Local nRectoMove local nSet := oBrwSets:Cargo[1] + + HB_SYMBOL_UNUSED( nSets ) + HB_SYMBOL_UNUSED( oWnd ) + do case case nKey == K_UP oBrwSets:Up() @@ -2768,7 +2761,6 @@ METHOD WatchPointsShow() CLASS TDebugger Local oCol local lRepaint := .f. local nTop - LOCAL lFocused if ::lGo return nil @@ -3009,7 +3001,7 @@ LOCAL lValid RETURN aWatch[WP_EXPR]+" <"+aWatch[WP_TYPE]+", " +cType+">: " +xVal METHOD ResizeWindows( oWindow ) CLASS TDebugger -LOCAL oWindow2, nTop, i +LOCAL oWindow2, nTop IF( oWindow == ::oWndVars ) oWindow2 := ::oWndPnt @@ -3286,7 +3278,7 @@ static procedure RefreshVarsS( oBrowse ) return -static function ArrayBrowseSkip( nPos, oBrwSets, n ) +static function ArrayBrowseSkip( nPos, oBrwSets ) return iif( oBrwSets:cargo[ 1 ] + nPos < 1, 0 - oBrwSets:cargo[ 1 ] + 1 , ; iif( oBrwSets:cargo[ 1 ] + nPos > Len(oBrwSets:cargo[ 2 ][ 1 ]), ; @@ -3331,5 +3323,3 @@ STATIC FUNCTION strip_path( cFileName ) HB_FNAMESPLIT( cFileName, NIL, @cName, @cExt ) RETURN cName + cExt - - diff --git a/harbour/source/rdd/dbupdat.prg b/harbour/source/rdd/dbupdat.prg index 605f8eb3a0..0cf91056e3 100644 --- a/harbour/source/rdd/dbupdat.prg +++ b/harbour/source/rdd/dbupdat.prg @@ -55,7 +55,6 @@ FUNCTION __dbUpdate( cAlias, bKey, lRandom, bAssign ) LOCAL nOldArea := Select() LOCAL xKey - LOCAL xPrevKey LOCAL oError diff --git a/harbour/source/rtl/achoice.prg b/harbour/source/rtl/achoice.prg index 17df8e774b..59241833dc 100644 --- a/harbour/source/rtl/achoice.prg +++ b/harbour/source/rtl/achoice.prg @@ -42,7 +42,6 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo LOCAL nFrstItem := 0 LOCAL nLastItem := 0 - LOCAL nCntr LOCAL bAction LOCAL cKey diff --git a/harbour/source/rtl/checkbox.prg b/harbour/source/rtl/checkbox.prg index 8531dde4f2..81d0b6a0b5 100644 --- a/harbour/source/rtl/checkbox.prg +++ b/harbour/source/rtl/checkbox.prg @@ -87,7 +87,6 @@ ENDCLASS METHOD New(nRow,nCol,cCaption) Local cColor:='' - Local oCheck ::Buffer := .f. ::Caption := cCaption diff --git a/harbour/source/rtl/dbedit.prg b/harbour/source/rtl/dbedit.prg index a37cfbe92c..41383fea3d 100644 --- a/harbour/source/rtl/dbedit.prg +++ b/harbour/source/rtl/dbedit.prg @@ -96,7 +96,6 @@ FUNCTION dbEdit(; LOCAL cAlias LOCAL cFieldName LOCAL cHeading - LOCAL cBlock LOCAL bBlock LOCAL aSubArray diff --git a/harbour/source/rtl/getsys.prg b/harbour/source/rtl/getsys.prg index 4be095baf2..00675ea762 100644 --- a/harbour/source/rtl/getsys.prg +++ b/harbour/source/rtl/getsys.prg @@ -324,6 +324,8 @@ FUNCTION RangeCheck( oGet, xDummy, xLow, xHigh ) LOCAL cMessage LOCAL nOldRow, nOldCol + HB_SYMBOL_UNUSED( xDummy ) + IF !oGet:changed RETURN .T. ENDIF @@ -392,9 +394,11 @@ PROCEDURE GuiApplyKey(oGet,nKey) RETURN -FUNCTION GuiGetPreValidate( oGet ,oGui) +FUNCTION GuiGetPreValidate( oGet, oGUI ) LOCAL oGetList := __GetListActive() + HB_SYMBOL_UNUSED( oGUI ) + IF oGetList != NIL IF oGet != NIL oGetList:oGet := oGet @@ -405,7 +409,7 @@ FUNCTION GuiGetPreValidate( oGet ,oGui) RETURN .F. -FUNCTION GuiGetPostValidate( oGet,oGui ) +FUNCTION GuiGetPostValidate( oGet, oGUI ) LOCAL oGetList := __GetListActive() IF oGetList != NIL @@ -413,7 +417,7 @@ FUNCTION GuiGetPostValidate( oGet,oGui ) oGetList:oGet := oGet ENDIF - RETURN oGetList:GuiGetPostValidate(oGui) + RETURN oGetList:GuiGetPostValidate( oGUI ) ENDIF RETURN .F. diff --git a/harbour/source/rtl/listbox.prg b/harbour/source/rtl/listbox.prg index 02cd8b8a7d..4e9c7bec88 100644 --- a/harbour/source/rtl/listbox.prg +++ b/harbour/source/rtl/listbox.prg @@ -211,8 +211,6 @@ Return ::vScrolls Method SetTop( xData ) Class HBListBox - Local nTop - If ( !( ISNIL( xData ) .and. ISNUMBER( xData ) ) .and. ISNUMBER( ( ::xTop := xData ) ) .and. ISOBJECT( ::vScroll ) ) ::vScroll:start := xData + 1 Endif @@ -763,7 +761,6 @@ Method HITTEST( nMouseRow, nMouseCol ) Class HBListBox Local nRet,ntop Local nHit := 0 - Local cColor If ( !::isopen ) Elseif ( !( ISOBJECT( ::vScroll ) ) ) Elseif ( ( nHit :=::vScroll:hittest( nMouseRow, nMouseCol ) ) != 0 ) diff --git a/harbour/source/rtl/persist.prg b/harbour/source/rtl/persist.prg index 1290399b72..b28b4ffe4d 100644 --- a/harbour/source/rtl/persist.prg +++ b/harbour/source/rtl/persist.prg @@ -72,7 +72,7 @@ ENDCLASS METHOD LoadFromText( cObjectText ) CLASS HBPersistent local nFrom := 1, cLine, cToken - local lStart := .t., aArray + local lStart := .t. private oSelf if empty( cObjectText ) @@ -93,7 +93,7 @@ METHOD LoadFromText( cObjectText ) CLASS HBPersistent endif case Upper( LTrim( __StrToken( cLine, 1 ) ) ) == "ARRAY" - cLine = SubStr( cLine, At( "::", cLine ) ) + cLine := SubStr( cLine, At( "::", cLine ) ) M->oSelf := Self cLine := StrTran( cLine, "::", "oSelf:" ) cLine := StrTran( cLine, " LEN ", " = Array( " ) @@ -210,7 +210,8 @@ return cArray static function ValToText( uValue ) local cType := ValType( uValue ) - local cText, cQuote := '"' + local cText + local cQuote := '"' do case case cType == "C" @@ -241,16 +242,14 @@ return cText static function ExtractLine( cText, nFrom ) - local cLine, nAt, nTo - - nAt = At( HB_OsNewLine(), cText, nFrom ) + local nAt := At( HB_OsNewLine(), cText, nFrom ) if nAt > 0 - cText = Substr( cText, nFrom, nAt - nFrom ) - nFrom = nAt + 2 + cText := Substr( cText, nFrom, nAt - nFrom ) + nFrom := nAt + 2 else - cText = Substr( cText, nFrom ) - nFrom = Len( cText ) + 1 + cText := Substr( cText, nFrom ) + nFrom := Len( cText ) + 1 endif -return cText \ No newline at end of file +return cText diff --git a/harbour/source/rtl/pushbtn.prg b/harbour/source/rtl/pushbtn.prg index 0a541d4fa9..cd536bcc2b 100644 --- a/harbour/source/rtl/pushbtn.prg +++ b/harbour/source/rtl/pushbtn.prg @@ -369,7 +369,7 @@ FUNCTION _GETNUMCOL( Arg1 ) Arg1 := "" ENDIF - nReturn := Ascan( aColors, { | a, b | a[ 1 ] == arg1 } ) + nReturn := Ascan( aColors, { | a | a[ 1 ] == arg1 } ) IF nReturn > 0 RETURN aColors[ nReturn, 2 ] diff --git a/harbour/source/rtl/radiobtn.prg b/harbour/source/rtl/radiobtn.prg index cfbd958359..0615d80fd2 100644 --- a/harbour/source/rtl/radiobtn.prg +++ b/harbour/source/rtl/radiobtn.prg @@ -149,10 +149,11 @@ METHOD kILLFOcus() CLASS HBRadioButton ::display() endif return Self -METHOD DISPLAy() CLASS HBRadioButton + +METHOD DISPLAY() CLASS HBRadioButton local cColor := SetColor(), cCurStyle, nCurRow:= Row(), nCurCol:= ; - Col(), cPairs, cPairs3, nPos, cPairs4, cOldCaption + Col(), nPos, cPairs4, cOldCaption cCurStyle := ::Style dispbegin() @@ -180,7 +181,7 @@ METHOD DISPLAy() CLASS HBRadioButton SetPos(::CapRow, ::CapCol) ?? cOldCaption if ( nPos != 0 ) - set color to (cPairs4) + set color to (cPairs4) // ; FIXME: cPairs4 is not initialized SetPos(::CapRow, ::CapCol + nPos - 1) ?? SubStr(cOldCaption, nPos, 1) endif @@ -189,6 +190,7 @@ METHOD DISPLAy() CLASS HBRadioButton set color to (cColor) SetPos(nCurRow, nCurCol) return Self + METHOD IsAccel( xValue ) CLASS HBRadioButton local nPos, cCaption, xResult diff --git a/harbour/source/rtl/tbcolumn.prg b/harbour/source/rtl/tbcolumn.prg index 9ff254699b..d2ebe9f458 100644 --- a/harbour/source/rtl/tbcolumn.prg +++ b/harbour/source/rtl/tbcolumn.prg @@ -98,8 +98,6 @@ ENDCLASS METHOD New( cHeading, bBlock ) CLASS TBColumn - local xRes, cType, nTokenPos := 0, nL - DEFAULT cHeading TO "" ::DefColor := { 1, 2, 1, 1 } diff --git a/harbour/source/rtl/tbrowse.prg b/harbour/source/rtl/tbrowse.prg index e19552e6c9..1298ab92f6 100644 --- a/harbour/source/rtl/tbrowse.prg +++ b/harbour/source/rtl/tbrowse.prg @@ -1010,7 +1010,6 @@ METHOD Stabilize() CLASS TBrowse local nRow, n local nWidth := ::nRight - ::nLeft + 1 // Visible width of the browse - local cColColor // Column color to use local oStartCol, oEndCol local lDisplay // Is there something to show inside current cell? local nRecsSkipped // How many records do I really skipped? @@ -1362,22 +1361,24 @@ return ::TApplyKey( nKey, self ) METHOD InitKeys( o ) CLASS TBROWSE - Default o:aKeys to {{K_DOWN,{|Ob,nKey| Ob:Down(),0}},; - {K_END,{|Ob,nKey| Ob:End(),0}},; - {K_CTRL_PGDN,{|Ob,nKey| Ob:GoBottom(),0}},; - {K_CTRL_PGUP,{|Ob,nKey| Ob:GoTop(),0}},; - {K_HOME,{|Ob,nKey| Ob:Home(),0}},; - {K_LEFT,{|Ob,nKey| Ob:Left(),0}},; - {K_PGDN,{|Ob,nKey| Ob:PageDown(),0}},; - {K_PGUP,{|Ob,nKey| Ob:PageUp(),0}},; - {K_CTRL_END,{|Ob,nKey| Ob:PanEnd(),0}},; - {K_CTRL_HOME,{|Ob,nKey| Ob:PanHome(),0}},; - {K_CTRL_LEFT,{|Ob,nKey| Ob:PanLeft(),0}},; - {K_CTRL_RIGHT,{|Ob,nKey| Ob:PanRight(),0}},; - {K_RIGHT,{|Ob,nKey| Ob:Right(),0}},; - {K_UP,{|Ob,nKey| Ob:Up(),0}},; - {K_ESC,{|Ob,nKey| -1 }},; - {K_LBUTTONDOWN,{|Ob,nKey| tbmouse(ob,mRow(),mCol())}}} + // ; Assigned codeblock receives two parameters: {|oTBrowse, nKey| } + + Default o:aKeys to {{ K_DOWN , {|Ob| Ob:Down(), 0 }},; + { K_END , {|Ob| Ob:End(), 0 }},; + { K_CTRL_PGDN , {|Ob| Ob:GoBottom(), 0 }},; + { K_CTRL_PGUP , {|Ob| Ob:GoTop(), 0 }},; + { K_HOME , {|Ob| Ob:Home(), 0 }},; + { K_LEFT , {|Ob| Ob:Left(), 0 }},; + { K_PGDN , {|Ob| Ob:PageDown(), 0 }},; + { K_PGUP , {|Ob| Ob:PageUp(), 0 }},; + { K_CTRL_END , {|Ob| Ob:PanEnd(), 0 }},; + { K_CTRL_HOME , {|Ob| Ob:PanHome(), 0 }},; + { K_CTRL_LEFT , {|Ob| Ob:PanLeft(), 0 }},; + { K_CTRL_RIGHT , {|Ob| Ob:PanRight(), 0 }},; + { K_RIGHT , {|Ob| Ob:Right(), 0 }},; + { K_UP , {|Ob| Ob:Up(),0 }},; + { K_ESC , {|| -1 }},; + { K_LBUTTONDOWN, {|Ob| tbmouse(ob, MRow(), MCol()) }}} return o diff --git a/harbour/source/rtl/tclass.prg b/harbour/source/rtl/tclass.prg index 11410766d3..cb2fa40b97 100644 --- a/harbour/source/rtl/tclass.prg +++ b/harbour/source/rtl/tclass.prg @@ -174,7 +174,8 @@ STATIC FUNCTION New( cClassName, xSuper ) //----------------------------------------------------------------------------// -STATIC PROCEDURE Create(MetaClass) +/* STATIC PROCEDURE Create(MetaClass) */ +STATIC PROCEDURE Create() LOCAL Self := QSelf() LOCAL n diff --git a/harbour/source/rtl/teditor.prg b/harbour/source/rtl/teditor.prg index efa6ff15eb..ad42323318 100644 --- a/harbour/source/rtl/teditor.prg +++ b/harbour/source/rtl/teditor.prg @@ -877,7 +877,6 @@ METHOD Edit(nPassedKey) CLASS HBEditor LOCAL i LOCAL nKey - LOCAL lOldInsert LOCAL lDelAppend LOCAL bKeyBlock LOCAL lSingleKeyProcess := .F. // .T. if I have to process passed key and then exit diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index b7013451f4..6d6c3ef4bf 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -492,7 +492,6 @@ return Self METHOD SetFocus() CLASS Get local lWasNil := ::buffer == NIL - local nFor ::hasfocus := .t. ::rejected := .f. @@ -1212,7 +1211,6 @@ METHOD PutMask( xValue, lEdit ) CLASS Get local cPicFunc local cMask local nFor - local nAt local nNoEditable := 0 diff --git a/harbour/source/rtl/tgetlist.prg b/harbour/source/rtl/tgetlist.prg index 4c1db37c7a..f53bd63ab3 100644 --- a/harbour/source/rtl/tgetlist.prg +++ b/harbour/source/rtl/tgetlist.prg @@ -61,7 +61,6 @@ * */ - #include "hbclass.ch" #include "common.ch" #include "getexit.ch" @@ -112,11 +111,11 @@ CLASS HBGetList METHOD ShowScoreBoard() METHOD ReadUpdated( lUpdated ) METHOD ReadVar( cNewVarName ) - METHOD ReadExit( lNew ) INLINE IF( ISLOGICAL(lNew), Set( _SET_EXIT, lNew ), Set( _SET_EXIT ) ) + METHOD ReadExit( lNew ) INLINE iif( ISLOGICAL(lNew), Set( _SET_EXIT, lNew ), Set( _SET_EXIT ) ) METHOD SetFocus() METHOD Updated() INLINE ::lUpdated -#ifdef HB_COMPAT_C53 +#ifdef HB_COMPAT_C53 METHOD GUIReader(oGet,getsys,a,b) METHOD GUIApplyKey( oGUI, nKey ) METHOD GUIPreValidate( oGUI ) @@ -126,6 +125,7 @@ CLASS HBGetList METHOD Accelerator( nKey ) // Removed STATIC METHOD HitTest( nMouseRow, nMouseColumn, aMsg ) // Removed STATIC #endif + ENDCLASS METHOD New( GetList ) CLASS HBGetList @@ -696,9 +696,13 @@ return lSavUpdated #ifdef HB_COMPAT_C53 -METHOD GuiReader(oget,getsys,a,b) CLASS HBGetList - //Local oGet := ::oGet - Local oGui +METHOD GuiReader(oget, getsys, a, b) CLASS HBGetList + //Local oGet := ::oGet + Local oGUI + + HB_SYMBOL_UNUSED( getsys ) + HB_SYMBOL_UNUSED( a ) + HB_SYMBOL_UNUSED( b ) if ! ::GUIPreValidate( oGet:Control ) @@ -713,7 +717,7 @@ METHOD GuiReader(oget,getsys,a,b) CLASS HBGetList do while oGet:exitState == GE_NOEXIT .AND. !::lKillRead // Check for initial typeout (no editable positions) - if ( oGui:typeOut ) + if ( oGUI:typeOut ) oGet:exitState := GE_ENTER endif @@ -743,9 +747,8 @@ METHOD GuiReader(oget,getsys,a,b) CLASS HBGetList return Self -METHOD GUIApplyKey( oGUI, nKey ) CLASS HBGetList +METHOD GUIApplyKey( oGUI, nKey ) CLASS HBGetList Local oGet := ::oGet - Local cKey Local bKeyBlock Local oTheClass Local nHotItem @@ -818,7 +821,7 @@ METHOD GUIApplyKey( oGUI, nKey ) CLASS HBGetList endif if valtype( oGet:VarGet() ) == "N" - oGet:VarPut( oGui:Value ) + oGet:VarPut( oGUI:Value ) endif @@ -913,7 +916,6 @@ METHOD GUIApplyKey( oGUI, nKey ) CLASS HBGetList METHOD TBApplyKey( oGet, oTB, nKey, aMsg ) CLASS HBGETLIST - Local cKey Local bKeyBlock Local nMouseRow, nMouseColumn Local nButton @@ -1062,6 +1064,8 @@ METHOD GUIPreValidate( oGUI ) CLASS HBGetList Local lWhen := .T. Local xValue + HB_SYMBOL_UNUSED( oGUI ) + if !( oGet:preBlock == NIL ) xValue := oGet:VarGet() oGet:type := ValType( xValue ) @@ -1102,10 +1106,11 @@ METHOD GUIPreValidate( oGUI ) CLASS HBGetList return lWhen -METHOD TBReader( oGet,oGetsys, aMsg ) Class HBGETLIST - Local oTB, nKey, lAutoLite, nCell, nSaveCursor, nProcessed - Local nRow, nCol -// Local oGui := oGet:control +METHOD TBReader( oGet, oGetsys, aMsg ) Class HBGETLIST + Local oTB, nKey, lAutoLite, nSaveCursor, nProcessed +// Local oGUI := oGet:control + + HB_SYMBOL_UNUSED( oGetsys ) // Read the GET if the WHEN condition is satisfied if VALTYPE( oGet:control ) == "O" .AND. ; // Moved up 2 lines. @@ -1187,7 +1192,7 @@ METHOD TBReader( oGet,oGetsys, aMsg ) Class HBGETLIST return Self -METHOD Accelerator( nKey) CLASS HBGETLIST // Removed STATIC +METHOD Accelerator( nKey ) CLASS HBGETLIST // Removed STATIC Local nGet, oGet, nHotPos, cKey, cCaption, nStart, nEnd Local nIteration, lGUI @@ -1267,7 +1272,7 @@ METHOD Accelerator( nKey) CLASS HBGETLIST // Removed STATIC return 0 -METHOD HitTest( nMouseRow, nMouseCol, aMsg ) CLASS HBGETLIST +METHOD HitTest( nMouseRow, nMouseCol, aMsg ) CLASS HBGETLIST Local nCount, nTotal, lGUI ::nNextGet := 0 diff --git a/harbour/source/rtl/tlabel.prg b/harbour/source/rtl/tlabel.prg index 06fa339406..2c68ef5920 100644 --- a/harbour/source/rtl/tlabel.prg +++ b/harbour/source/rtl/tlabel.prg @@ -121,10 +121,11 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ; LOCAL xBreakVal, lBroke := .F. LOCAL err LOCAL OldMargin - LOCAL nLen +// LOCAL nLen - ::aBandToPrint:={} // ARRAY(5) + ::aBandToPrint := {} // ARRAY(5) ::nCurrentCol := 1 + // Resolve parameters IF cLBLName == NIL err := ErrorNew() @@ -132,12 +133,10 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ; err:genCode := EG_ARG err:subSystem := "FRMLBL" Eval(ErrorBlock(), err) - ELSE IF AT( ".", cLBLName ) == 0 cLBLName := TRIM( cLBLName ) + ".lbl" ENDIF - ENDIF IF lPrinter == NIL @@ -191,10 +190,8 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ; IF ::lOneMoreBand // Print the band AEVAL( ::aBandToPrint, { | BandLine | PrintIt( BandLine ) } ) - ENDIF - RECOVER USING xBreakVal lBroke := .T. @@ -221,11 +218,11 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ; BREAK xBreakVal // continue breaking ENDIF - SET( _SET_MARGIN, OldMargin) + SET( _SET_MARGIN, OldMargin ) RETURN Self - METHOD ExecuteLabel() CLASS HBLabelForm +METHOD ExecuteLabel() CLASS HBLabelForm LOCAL nField, nMoreLines, aBuffer := {}, cBuffer LOCAL v @@ -456,13 +453,13 @@ METHOD LoadLabel( cLblFile ) CLASS HBLabelForm // Close file FCLOSE( nHandle ) + nFileError := FERROR() ENDIF + RETURN aLabel - - FUNCTION __LabelForm( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ; bWhile, nNext, nRecord, lRest, lSample ) @@ -474,6 +471,7 @@ STATIC PROCEDURE PrintIt( cString ) IF cString == NIL cString := "" ENDIF + QQOUT( cString ) QOUT() @@ -514,4 +512,3 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter ) ENDIF RETURN aList // Return the array - diff --git a/harbour/source/rtl/treport.prg b/harbour/source/rtl/treport.prg index 3a8f6012ab..7f965ce966 100644 --- a/harbour/source/rtl/treport.prg +++ b/harbour/source/rtl/treport.prg @@ -451,7 +451,7 @@ METHOD ReportHeader() CLASS HBReportForm LOCAL nLinesInHeader := 0 LOCAL aPageHeader := {} LOCAL nHeadingLength := ::aReportData[RPT_WIDTH] - ::aReportData[RPT_LMARGIN] -30 - LOCAL nCol,nLine,nMaxColLength,nGroup,cHeader + LOCAL nCol, nLine, nMaxColLength, cHeader LOCAL nHeadline LOCAL nRPageSize LOCAL aTempPgHeader @@ -561,7 +561,6 @@ METHOD ExecuteReport() CLASS HBReportForm LOCAL nMaxLines // Number of lines needed by record LOCAL nLine // Counter for each record line LOCAL cLine // Current line of text for parsing - LOCAL nLastElement // Last element pointer if record is LOCAL lAnySubTotals @@ -886,8 +885,6 @@ METHOD LoadReportFile(cFrmFile) CLASS HBReportForm LOCAL aPaths // array of paths LOCAL nPathIndex := 0 // iteration counter - LOCAL s, paths - LOCAL i LOCAL aHeader // temporary storage for report form headings LOCAL nHeaderIndex // index into temporary header array @@ -1270,7 +1267,7 @@ STATIC FUNCTION ParseHeader( cHeaderString, nFields ) * */ METHOD GetColumn( cFieldsBuffer, nOffset ) CLASS HBReportForm - LOCAL nPointer := 0, nNumber := 0, aColumn[ RCT_COUNT ], cType,cExpr + LOCAL nPointer := 0, nNumber := 0, aColumn[ RCT_COUNT ], cType, cExpr // Column width aColumn[ RCT_WIDTH ] := BIN2W(SUBSTR(cFieldsBuffer, nOffset + ; @@ -1371,22 +1368,20 @@ STATIC FUNCTION ListAsArray( cList, cDelimiter ) STATIC FUNCTION MakeAStr( uVar, cType ) LOCAL cString + DO CASE CASE UPPER(cType) == "D" cString := DTOC( uVar ) - CASE UPPER(cType) == "L" cString := iif( uVar, "T", "F" ) - CASE UPPER(cType) == "N" cString := STR( uVar ) - CASE UPPER(cType) == "C" cString := uVar - OTHERWISE cString := "INVALID EXPRESSION" ENDCASE + RETURN cString FUNCTION __ReportForm( cFRMName, lPrinter, cAltFile, lNoConsole, bFor, ; diff --git a/harbour/utils/hbdoc/genchm.prg b/harbour/utils/hbdoc/genchm.prg index 5a173b36ac..c83fbeba3f 100644 --- a/harbour/utils/hbdoc/genchm.prg +++ b/harbour/utils/hbdoc/genchm.prg @@ -137,7 +137,6 @@ FUNCTION ProcessChm() LOCAL lEndSyntax := .F. LOCAL lEndReturns := .F. LOCAL lEndData := .F. - LOCAL lDataLink LOCAL lBlankLine := .F. // Blank line encountered and sent out LOCAL lAddBlank := .F. // Need to add a blank line if next line is not blank @@ -930,7 +929,9 @@ FUNCTION FormatChmBuff( cBuffer, cStyle, oChm ) LOCAL lEndBuffer := .f. LOCAL lArgBold := .f. LOCAL npos - LOCAL nposend + + HB_SYMBOL_UNUSED( oChm ) + creturn := cBuffer + ' ' IF AT( '', creturn ) > 0 .OR. EMPTY( cBuffer ) IF EMPTY( cbuffer ) @@ -1094,7 +1095,6 @@ FUNCTION ProcChmDesc( cBuffer, oChm, cStyle ) LOCAL nColorPos LOCAL ccolor := '' LOCAL creturn := '' - LOCAL ncolorend LOCAL nIdentLevel LOCAL lHasFixed := .F. LOCAL lEndPar := .F. @@ -1398,7 +1398,6 @@ STATIC FUNCTION ReadFromTop( nh ) LOCAL cClassDoc := DELIM + "CLASSDOC" + DELIM LOCAL cBuffer := '' LOCAL NPOS := 0 - LOCAL nlenpos LOCAL aLocDoc := {} DO WHILE FREADline( nH, @cBuffer, 4096 ) cBuffer := TRIM( SUBSTR( cBuffer, nCommentLen ) ) @@ -1426,7 +1425,6 @@ STATIC FUNCTION GetItem( cItem, nCurdoc ) LOCAL nPos LOCAL cCuritem LOCAL lReturn - LOCAL x LOCAL xPos xPos := aCurdoc[ nCurdoc ] nPos := ASCAN( xPos, { | x, y | UPPER( ALLTRIM( x ) ) == UPPER( ALLTRIM( cItem ) ) } ) diff --git a/harbour/utils/hbdoc/genhtm.prg b/harbour/utils/hbdoc/genhtm.prg index fe82f09b75..85c535f63f 100644 --- a/harbour/utils/hbdoc/genhtm.prg +++ b/harbour/utils/hbdoc/genhtm.prg @@ -136,7 +136,6 @@ FUNCTION ProcessWww() LOCAL lEndSyntax := .F. LOCAL lEndReturns := .F. LOCAL lEndData := .F. - LOCAL lDataLink LOCAL lBlankLine := .F. // Blank line encountered and sent out LOCAL lAddBlank := .F. // Need to add a blank line if next line is not blank @@ -177,7 +176,9 @@ FUNCTION ProcessWww() LOCAL cData := DELIM + "DATA" + DELIM LOCAL cMethod := DELIM + 'METHOD' + DELIM LOCAL cClassDoc := DELIM + "CLASSDOC" + DELIM +#ifdef GAUGE Local aGauge,agauge1 +#endif LOCAL nDocs:=0 // // Entry Point @@ -936,7 +937,9 @@ FUNCTION FormatHtmBuff( cBuffer, cStyle, oHtm ) LOCAL lEndBuffer := .f. LOCAL lArgBold := .f. LOCAL npos - LOCAL nposend + + HB_SYMBOL_UNUSED( oHtm ) + creturn := cBuffer + ' ' IF AT( '', creturn ) > 0 .OR. EMPTY( cBuffer ) IF EMPTY( cbuffer ) @@ -1101,7 +1104,6 @@ FUNCTION ProchtmDesc( cBuffer, oHtm, cStyle ) LOCAL nColorPos LOCAL ccolor := '' LOCAL creturn := '' - LOCAL ncolorend LOCAL nIdentLevel LOCAL lEndPar := .F. LOCAL cLine := '' @@ -1407,7 +1409,6 @@ STATIC FUNCTION ReadFromTop( nh ) LOCAL cClassDoc := DELIM + "CLASSDOC" + DELIM LOCAL cBuffer := '' LOCAL NPOS := 0 - LOCAL nlenpos LOCAL aLocDoc := {} DO WHILE FREADline( nH, @cBuffer, 4096 ) cBuffer := TRIM( SUBSTR( cBuffer, nCommentLen ) ) @@ -1435,7 +1436,6 @@ STATIC FUNCTION GetItem( cItem, nCurdoc ) LOCAL nPos LOCAL cCuritem LOCAL lReturn:=.F. - LOCAL x LOCAL xPos if nCurdoc <= len(aCurdoc) diff --git a/harbour/utils/hbdoc/genng.prg b/harbour/utils/hbdoc/genng.prg index 64602ccd83..469166e3fd 100644 --- a/harbour/utils/hbdoc/genng.prg +++ b/harbour/utils/hbdoc/genng.prg @@ -118,9 +118,6 @@ FUNCTION ProcessiNg() LOCAL lData := .F. LOCAL lMethod := .F. - LOCAL cBuffEnd - LOCAL nPos - LOCAL nPosEND LOCAL lIsDataLink := .F. LOCAL lIsMethodLink := .F. @@ -953,8 +950,6 @@ RETURN nil *+ FUNCTION GenNgTable( oNgi ) - LOCAL y - LOCAL nLen2 LOCAL x LOCAL nMax LOCAL nSpace @@ -963,7 +958,6 @@ FUNCTION GenNgTable( oNgi ) LOCAL nSpace2 LOCAL nPos1 LOCAL nPos2 - LOCAL LColor LOCAL nPos LOCAL aLensFItem := {} LOCAL aLensSItem := {} @@ -976,7 +970,7 @@ FUNCTION GenNgTable( oNgi ) LOCAL nSpace4 LOCAL aLensTItem := {} LOCAL aLensfoItem := {} - LOCAL nLen + FOR X := 1 TO LEN( afitable ) IF !EMPTY( afiTable[ x ] ) AADD( aLensFItem, LEN( afiTable[ x ] ) ) @@ -1155,7 +1149,6 @@ FUNCTION ProcNgTable( cBuffer, nNum ) LOCAL cItem2 := '' LOCAL cItem3 := '' LOCAL cItem4 := '' - LOCAL xtype LOCAL nColorpos LOCAL cColor cBuffer := ALLTRIM( cBuffer ) @@ -1286,7 +1279,6 @@ FUNCTION ProcNGDesc( cBuffer, oNgi, cStyle ) LOCAL nColorPos LOCAL ccolor := '' LOCAL cReturn := '' - LOCAL ncolorend LOCAL nIdentLevel LOCAL cOldLine LOCAL lEndPar := .F. @@ -1608,7 +1600,6 @@ FUNC maxelem( a ) LOCAL tam := 0 LOCAL nMax2 := 0 LOCAL nPos := 1 - LOCAL cString LOCAL nCount FOR nCount := 1 TO nSize @@ -1638,9 +1629,11 @@ FUNCTION FormatNgBuff( cBuffer, cStyle, ongi ) LOCAL cBuffEnd := '' LOCAL lEndBuffer := .f. LOCAL nPos - LOCAL nPosend LOCAL lArgBold := .f. LOCAL LFstTableItem := .t. + + HB_SYMBOL_UNUSED( ongi ) + cReturn := cBuffer + ' ' IF AT( '', cReturn ) > 0 .OR. EMPTY( cBuffer ) IF EMPTY( cbuffer ) @@ -1739,7 +1732,6 @@ STATIC FUNCTION ReadFromTop( nh ) LOCAL cClassDoc := DELIM + "CLASSDOC" + DELIM LOCAL cBuffer := '' LOCAL NPOS := 0 - LOCAL nlenpos LOCAL aLocDoc := {} DO WHILE FREADline( nH, @cBuffer, 4096 ) cBuffer := TRIM( SUBSTR( cBuffer, nCommentLen ) ) @@ -1767,7 +1759,6 @@ STATIC FUNCTION GetItem( cItem, nCurdoc ) LOCAL nPos LOCAL cCuritem LOCAL lReturn - LOCAL x LOCAL xPos xPos := aCurdoc[ nCurdoc ] nPos := ASCAN( xPos, { | x, y | UPPER( ALLTRIM( x ) ) == UPPER( ALLTRIM( cItem ) ) } ) diff --git a/harbour/utils/hbdoc/genos2.prg b/harbour/utils/hbdoc/genos2.prg index 09b1ab7974..007f371ab0 100644 --- a/harbour/utils/hbdoc/genos2.prg +++ b/harbour/utils/hbdoc/genos2.prg @@ -134,10 +134,6 @@ FUNCTION ProcessOs2() LOCAL oOs2 LOCAL lData := .F. LOCAL lMethod := .F. - LOCAL nPos - LOCAL nEpos - LOCAL nPosend - LOCAL cBuffEnd LOCAL lIsDataLink := .F. LOCAL lIsMethodLink := .F. @@ -740,16 +736,14 @@ FUNCTION Formatos2Buff( cBuffer, cStyle, ongi ) LOCAL cReturn := '' LOCAL cLine := '' - LOCAL cBuffend := '' - LOCAL cEnd - LOCAL cStart LOCAL coline := '' LOCAL lEndBuff := .f. LOCAL nPos - LOCAL nPosEnd LOCAL lArgBold := .f. + HB_SYMBOL_UNUSED( ongi ) + cReturn := cBuffer + ' ' IF AT( '', cReturn ) > 0 .OR. EMPTY( cBuffer ) IF EMPTY( cbuffer ) @@ -879,7 +873,6 @@ FUNCTION ProcOs2Table( cBuffer , nNum ) LOCAL cItem2 LOCAL cItem3 LOCAL cItem4 - LOCAL xtype LOCAL nColorpos LOCAL cColor cBuffer := ALLTRIM( cBuffer ) @@ -955,7 +948,6 @@ FUNC maxos2elem( a ) LOCAL tam := 0 LOCAL max2 := 0 LOCAL nPos := 1 - LOCAL cString LOCAL ncount FOR ncount := 1 TO nsize tam := LEN( a[ ncount ] ) @@ -974,7 +966,7 @@ RETURN max *+ FUNCTION Genos2Table( oOs2 ) Local x - Local cItem,cItem1,cItem2,cItem3 + Local cItem,cItem1 // oos2:WritePar( "" ) if nNumTableItems == 2 citem := str(maxos2elem(afitable),2) @@ -1041,7 +1033,6 @@ FUNCTION Procos2Desc( cBuffer, oOs2, cStyle ) LOCAL nColorPos LOCAL ccolor := '' LOCAL creturn := '' - LOCAL ncolorend LOCAL NIDENTLEVEL LOCAL coline LOCAL lEndPar := .F. @@ -1285,7 +1276,6 @@ STATIC FUNCTION ReadFromTop( nh ) LOCAL cClassDoc := DELIM + "CLASSDOC" + DELIM LOCAL cBuffer := '' LOCAL NPOS := 0 - LOCAL nlenpos LOCAL aLocDoc := {} DO WHILE FREADline( nH, @cBuffer, 4096 ) cBuffer := TRIM( SUBSTR( cBuffer, nCommentLen ) ) @@ -1313,7 +1303,6 @@ STATIC FUNCTION GetItem( cItem, nCurdoc ) LOCAL nPos LOCAL cCuritem LOCAL lReturn - LOCAL x LOCAL xPos xPos := aCurdoc[ nCurdoc ] nPos := ASCAN( xPos, { | x, y | UPPER( ALLTRIM( x ) ) == UPPER( ALLTRIM( cItem ) ) } ) diff --git a/harbour/utils/hbdoc/genrtf.prg b/harbour/utils/hbdoc/genrtf.prg index 3dc9eb977f..a8f31a1761 100644 --- a/harbour/utils/hbdoc/genrtf.prg +++ b/harbour/utils/hbdoc/genrtf.prg @@ -134,10 +134,6 @@ FUNCTION ProcessRtf() LOCAL lPar LOCAL lWrite := .f. LOCAL lWasLine := .F. - LOCAL nPos - LOCAL nEpos - LOCAL nPosend - LOCAL cBuffEnd LOCAL lIsDataLink := .F. LOCAL lIsMethodLink := .F. LOCAL cName @@ -850,7 +846,6 @@ FUNCTION ProcRTFDesc( cBuffer, oRtf, cStyle ) LOCAL nColorPos LOCAL ccolor := '' LOCAL creturn := '' - LOCAL ncolorend LOCAL NIDENTLEVEL LOCAL coline LOCAL lEndPar := .F. @@ -1016,9 +1011,6 @@ FUNCTION ProcRtfTable( cBuffer ) LOCAL nPos LOCAL cItem - LOCAL cItem2 - LOCAL cItem3 - LOCAL xtype LOCAL nColorpos LOCAL cColor IF AT( " 0 @@ -1057,17 +1049,10 @@ RETURN Nil *+ FUNCTION GenRtfTable( oRtf ) - LOCAL y - LOCAL nLen2 LOCAL x - LOCAL nMax - LOCAL nSpace LOCAL lCar := .f. LOCAL nMax2 - LOCAL nSpace2 - LOCAL nPos1 LOCAL nPos2 - LOCAL LColor LOCAL nPos LOCAL aLensFItem := {} LOCAL aLensSItem := {} @@ -1172,13 +1157,13 @@ FUNCTION FormatrtfBuff( cBuffer, cStyle, ongi ) LOCAL cReturn := '' LOCAL cLine := '' LOCAL cBuffend := '' - LOCAL cEnd - LOCAL cStart LOCAL coline := '' LOCAL lEndBuff := .f. LOCAL nPos - LOCAL nPosEnd LOCAL lArgBold := .f. + + HB_SYMBOL_UNUSED( ongi ) + creturn := cBuffer + ' ' IF AT( '', creturn ) > 0 .OR. EMPTY( cBuffer ) IF EMPTY( cbuffer ) @@ -1280,7 +1265,6 @@ STATIC FUNCTION ReadFromTop( nh ) LOCAL cClassDoc := DELIM + "CLASSDOC" + DELIM LOCAL cBuffer := '' LOCAL NPOS := 0 - LOCAL nlenpos LOCAL aLocDoc := {} DO WHILE FREADline( nH, @cBuffer, 4096 ) cBuffer := TRIM( SUBSTR( cBuffer, nCommentLen ) ) @@ -1308,7 +1292,6 @@ STATIC FUNCTION GetItem( cItem, nCurdoc ) LOCAL nPos LOCAL cCuritem LOCAL lReturn - LOCAL x LOCAL xPos xPos := aCurdoc[ nCurdoc ] nPos := ASCAN( xPos, { | x, y | UPPER( ALLTRIM( x ) ) == UPPER( ALLTRIM( cItem ) ) } ) diff --git a/harbour/utils/hbdoc/gentrf.prg b/harbour/utils/hbdoc/gentrf.prg index e6d9c69661..1baf098d92 100644 --- a/harbour/utils/hbdoc/gentrf.prg +++ b/harbour/utils/hbdoc/gentrf.prg @@ -57,6 +57,7 @@ #include "directry.ch" #include "fileio.ch" #include "inkey.ch" +#include "common.ch" // output lines on the screen diff --git a/harbour/utils/hbdoc/html.prg b/harbour/utils/hbdoc/html.prg index c0a5cd67d1..b01b7e5cb9 100644 --- a/harbour/utils/hbdoc/html.prg +++ b/harbour/utils/hbdoc/html.prg @@ -255,7 +255,6 @@ RETURN Self METHOD NewContent( cFile ) CLASS THTML - Local nCount IF Nx > 0 FCLOSE( NX ) ENDIF diff --git a/harbour/utils/hbdoc/ng.prg b/harbour/utils/hbdoc/ng.prg index 529bec2d5e..a4c1e31bf5 100644 --- a/harbour/utils/hbdoc/ng.prg +++ b/harbour/utils/hbdoc/ng.prg @@ -107,10 +107,6 @@ RETURN Self METHOD WriteTitle( cTopic, cTitle ) CLASS TNortonGuide - LOCAL cTemp - LOCAL nPos - LOCAL cWrite - cTopic := HB_OEMTOANSI( cTopic ) FWRITE( Self:nHandle, "!Short: " + cTopic + CRLF ) diff --git a/harbour/utils/hbdoc/os2.prg b/harbour/utils/hbdoc/os2.prg index b70a1d4691..c91c452b7a 100644 --- a/harbour/utils/hbdoc/os2.prg +++ b/harbour/utils/hbdoc/os2.prg @@ -219,9 +219,6 @@ RETURN Self METHOD WriteTitle( cTopic, cTitle ,cCategory) CLASS TOs2 - LOCAL cTemp - LOCAL nPos - LOCAL cWrite LOCAL nItem Local lHead:=.F. LOCAL nrItem,nIItem @@ -300,7 +297,6 @@ RETURN Self METHOD ScanLink( cLink ) CLASS TOs2 LOCAL nItem - LOCAL nReturn nItem := ASCAN( Self:aLinkRef, { | a, b | Upper(a[ 1 ] )== upper(cLink) } ) @@ -313,7 +309,6 @@ RETURN nItem METHOD ScanRef( cLink ) CLASS TOs2 LOCAL nItem - LOCAL nReturn nItem := ASCAN( Self:aHeadRef, { | a | Upper(a)== upper(cLink) } ) @@ -326,7 +321,6 @@ RETURN nItem METHOD ScanInd( cLink ) CLASS TOs2 LOCAL nItem - LOCAL nReturn nItem := ASCAN( Self:aIndRef, { | a | Upper(a)== upper(cLink) } ) @@ -368,7 +362,6 @@ RETURN cReturn METHOD WriteJumpTitle( cTitle, cTopic ) CLASS TOs2 - LOCAL cTemp LOCAL nPos LOCAL cWrite diff --git a/harbour/utils/hbdoc/rtf.prg b/harbour/utils/hbdoc/rtf.prg index 86bb9cb358..736053d708 100644 --- a/harbour/utils/hbdoc/rtf.prg +++ b/harbour/utils/hbdoc/rtf.prg @@ -306,6 +306,8 @@ Local cItem:=' ' Local nPos:=0 Local nSize:=Len(aLink) +HB_SYMBOL_UNUSED( lAlink ) + if nSize >2 For nPos:=1 to nSize if nPos==nSize diff --git a/harbour/utils/hbmake/checks.prg b/harbour/utils/hbmake/checks.prg index 56596b87e0..2710deb444 100644 --- a/harbour/utils/hbmake/checks.prg +++ b/harbour/utils/hbmake/checks.prg @@ -119,9 +119,7 @@ RETURN PROC CheckApplyKey(oGet, nKey) -LOCAL cKey LOCAL bKeyBlock -LOCAL nSaveRow, nSaveCol // check for SET KEY first IF ( (bKeyBlock := SetKey(nKey)) <> NIL ) @@ -185,10 +183,8 @@ RETURN PROC DrawCheck(oGet) LOCAL lSelected := Eval(oGet:checkGsb) -LOCAL oGet1 LOCAL nSaveRow := Row() LOCAL nSaveCol := Col() -LOCAL nGet DevPos(oGet:row, oGet:col - 3) IF lSelected diff --git a/harbour/utils/hbmake/hbmake.prg b/harbour/utils/hbmake/hbmake.prg index 2e72cb1efe..a128acee59 100644 --- a/harbour/utils/hbmake/hbmake.prg +++ b/harbour/utils/hbmake/hbmake.prg @@ -110,7 +110,6 @@ Static cDefLang FUNCTION main( cFile, p1, p2, p3, p4, p5, p6 ) - LOCAL nPos LOCAL aFile := {} LOCAL aDef := {} LOCAL cOs := Os() @@ -255,7 +254,6 @@ RETURN nil FUNCTION ParseMakfi( cFile ) - LOCAL nPos LOCAL cBuffer := {} LOCAL cMacro := "#BCC" LOCAL cDep := "#DEPENDS" @@ -546,7 +544,6 @@ RETURN nil FUNCTION Checkdefine( cTemp ) - LOCAL cDef LOCAL nPos LOCAL cRead LOCAL aSet := {} @@ -594,7 +591,6 @@ RETURN nil FUNCTION Setcommands( cTemP ) LOCAL cRead := Alltrim( readln( @leof ) ) - LOCAL nPos LOCAL nCount := 0 LOCAL aTempMacros := {} LOCAL aLocalMacros := {} @@ -652,7 +648,6 @@ RETURN cRead FUNCTION Replacemacros( cMacros ) - LOCAL nPos LOCAL nCount := 0 LOCAL aTempMacros := {} LOCAL aLocalMacros := {} @@ -1164,8 +1159,6 @@ RETURN NIL FUNCTION PrintMacros() - LOCAL nPos - Outstd( "HBMAKE Version ", Version(), "CopyRight (c) 2000-2002 The Harbour Project" + CRLF ) Outstd( "" + CRLF ) Outstd( "Macros:" + CRLF ) @@ -2317,7 +2310,6 @@ FUNC crtlibmakfile( cFile ) LOCAL cObjDir := 'obj' + Space( 20 ) LOCAL lCompMod := .f. LOCAL x - LOCAL y LOCAL nPos as numeric LOCAL lGenppo := .f. LOCAL getlist := {} diff --git a/harbour/utils/hbmake/hbmutils.prg b/harbour/utils/hbmake/hbmutils.prg index ed8863c649..21101422f5 100644 --- a/harbour/utils/hbmake/hbmutils.prg +++ b/harbour/utils/hbmake/hbmutils.prg @@ -31,7 +31,7 @@ Function GetSourceFiles( lSubdir ) Local cdrive Local nPos Local xItem - local ccc,ddd + Default lSubdir To .t. diff --git a/harbour/utils/hbmake/radios.prg b/harbour/utils/hbmake/radios.prg index 7c71da9dba..00ec6e01da 100644 --- a/harbour/utils/hbmake/radios.prg +++ b/harbour/utils/hbmake/radios.prg @@ -132,9 +132,7 @@ RETURN PROC RadioApplyKey(oGet, nKey, aGetList) -LOCAL cKey LOCAL bKeyBlock -LOCAL nSaveRow, nSaveCol // check for SET KEY first IF ( (bKeyBlock := SetKey(nKey)) <> NIL ) diff --git a/harbour/utils/hbtest/rt_hvm.prg b/harbour/utils/hbtest/rt_hvm.prg index d37917244c..e83d0d18b1 100644 --- a/harbour/utils/hbtest/rt_hvm.prg +++ b/harbour/utils/hbtest/rt_hvm.prg @@ -56,7 +56,6 @@ #include "rt_vars.ch" FUNCTION Main_HVM() - LOCAL nA, nB, nC /* NOTE: CA-Cl*pper PP fails on these TEST_LINE( "1" .AND. "2" , "E BASE 1066 Argument error conditional " )