From 3f4cf28f682e3dd40762bbc35f29e2c19faa50e3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 10 Nov 2012 20:04:37 +0000 Subject: [PATCH] 2012-11-10 20:55 UTC+0100 Viktor Szakats (harbour syenar.net) * src/rtl/hbgtcore.c * changed HB_GTI_COMPATBUFFER default to be Clipper compatible. INCOMPATIBLE compared to 3.2 versions, but restores the compatibility with previous ones and Clipper. Applications using Unicode, must now manually change these buffers to be Unicode compatible using: #include "hbgtinfo.ch" hb_gtInfo( HB_GTI_COMPATBUFFER, .F. ) * include/assert.ch * include/hbclass.ch * contrib/rddads/ads.ch * contrib/xhb/hbdll.ch * contrib/xhb/hblog.ch * contrib/xhb/ttable.ch ! use 'END' instead of 'ENDIF' consistently in command translated code. (most of these is result of recent regression) * contrib/gtwvg/class.prg * contrib/gtwvg/combobox.prg * contrib/gtwvg/crt.prg * contrib/gtwvg/menubar.prg * contrib/gtwvg/statbar.prg * contrib/gtwvg/static.prg * contrib/gtwvg/syswnd.prg * contrib/gtwvg/tests/_modal.prg * contrib/gtwvg/wnd.prg * contrib/hbgd/tests/test_out.prg * contrib/hbmysql/tmysql.prg * contrib/xhb/decode.prg * contrib/xhb/xhbtedit.prg * extras/hbdoc/hbdoc.prg * extras/httpsrv/cgifunc.prg * extras/httpsrv/session.prg % deleted excessive parenthesis ! fixed some '- 1' to '-1' in older hbformatted code * extras/gtwvw/tests/_wvwmous.prg * extras/gtwvw/tests/wvt2wvw.ch * extras/hbvpdf/core.prg * extras/httpsrv/uhttpd.prg * extras/rddado/adordd.ch * include/hbsix.ch * minor cleanups --- harbour/ChangeLog | 49 +++++++++++++++++++++++++ harbour/contrib/gtwvg/class.prg | 14 +++---- harbour/contrib/gtwvg/combobox.prg | 2 +- harbour/contrib/gtwvg/crt.prg | 4 +- harbour/contrib/gtwvg/menubar.prg | 10 ++--- harbour/contrib/gtwvg/statbar.prg | 2 +- harbour/contrib/gtwvg/static.prg | 14 +++---- harbour/contrib/gtwvg/syswnd.prg | 2 +- harbour/contrib/gtwvg/tests/_modal.prg | 2 +- harbour/contrib/gtwvg/wnd.prg | 2 +- harbour/contrib/hbgd/tests/test_out.prg | 16 +++++--- harbour/contrib/hbmysql/tmysql.prg | 4 +- harbour/contrib/rddads/ads.ch | 2 +- harbour/contrib/xhb/decode.prg | 6 +-- harbour/contrib/xhb/hbdll.ch | 22 +++++------ harbour/contrib/xhb/hblog.ch | 12 +++--- harbour/contrib/xhb/ttable.ch | 4 +- harbour/contrib/xhb/xhbtedit.prg | 19 +++++----- harbour/extras/gtwvw/tests/_wvwmous.prg | 2 +- harbour/extras/gtwvw/tests/wvt2wvw.ch | 6 +-- harbour/extras/hbdoc/hbdoc.prg | 2 +- harbour/extras/hbvpdf/core.prg | 6 +-- harbour/extras/httpsrv/cgifunc.prg | 2 +- harbour/extras/httpsrv/session.prg | 4 +- harbour/extras/httpsrv/uhttpd.prg | 29 +++------------ harbour/extras/rddado/adordd.ch | 2 +- harbour/include/assert.ch | 2 +- harbour/include/hbclass.ch | 26 ++++++------- harbour/include/hbsix.ch | 2 +- harbour/src/rtl/hbgtcore.c | 2 +- 30 files changed, 154 insertions(+), 117 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 654ee7affe..9ef10bd2cf 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,55 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-10 20:55 UTC+0100 Viktor Szakats (harbour syenar.net) + * src/rtl/hbgtcore.c + * changed HB_GTI_COMPATBUFFER default to be Clipper + compatible. INCOMPATIBLE compared to 3.2 versions, + but restores the compatibility with previous ones + and Clipper. Applications using Unicode, must now + manually change these buffers to be Unicode + compatible using: + #include "hbgtinfo.ch" + hb_gtInfo( HB_GTI_COMPATBUFFER, .F. ) + + * include/assert.ch + * include/hbclass.ch + * contrib/rddads/ads.ch + * contrib/xhb/hbdll.ch + * contrib/xhb/hblog.ch + * contrib/xhb/ttable.ch + ! use 'END' instead of 'ENDIF' consistently + in command translated code. (most of these + is result of recent regression) + + * contrib/gtwvg/class.prg + * contrib/gtwvg/combobox.prg + * contrib/gtwvg/crt.prg + * contrib/gtwvg/menubar.prg + * contrib/gtwvg/statbar.prg + * contrib/gtwvg/static.prg + * contrib/gtwvg/syswnd.prg + * contrib/gtwvg/tests/_modal.prg + * contrib/gtwvg/wnd.prg + * contrib/hbgd/tests/test_out.prg + * contrib/hbmysql/tmysql.prg + * contrib/xhb/decode.prg + * contrib/xhb/xhbtedit.prg + * extras/hbdoc/hbdoc.prg + * extras/httpsrv/cgifunc.prg + * extras/httpsrv/session.prg + % deleted excessive parenthesis + ! fixed some '- 1' to '-1' in older hbformatted + code + + * extras/gtwvw/tests/_wvwmous.prg + * extras/gtwvw/tests/wvt2wvw.ch + * extras/hbvpdf/core.prg + * extras/httpsrv/uhttpd.prg + * extras/rddado/adordd.ch + * include/hbsix.ch + * minor cleanups + 2012-11-10 19:44 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbwin/hbwin.ch ! C++ comment changed to ANSI C now that the file is diff --git a/harbour/contrib/gtwvg/class.prg b/harbour/contrib/gtwvg/class.prg index 6da7b15a70..0a63e741f6 100644 --- a/harbour/contrib/gtwvg/class.prg +++ b/harbour/contrib/gtwvg/class.prg @@ -559,7 +559,7 @@ METHOD WvtDialog:Inkey() ::lEventHandled := ::oCurObj:HandleEvent( ::nKey ) - IF ( ::lEventHandled ) + IF ::lEventHandled IF ::oCurObj:nChildren > 0 FOR i := 1 to ::oCurObj:nChildren IF AScan( ::oCurObj:aChildren[ i, OBJ_CHILD_EVENTS ], ::nKey ) > 0 @@ -1309,7 +1309,7 @@ METHOD WvtStatusBar:SetPanels( aPanels ) ATail( ::aPanels ):nRight := nLastCol - FOR i := Len( ::aPanels ) - 1 TO 1 STEP - 1 + FOR i := Len( ::aPanels ) - 1 TO 1 STEP -1 oPanel := ::aPanels[ i ] oPanel:nRight := ::aPanels[ i + 1 ]:nLeft oPanel:cColor := ::cColor @@ -1603,7 +1603,7 @@ METHOD WvtToolBar:Refresh() METHOD WvtToolBar:PaintToolBar() - IF ( ::lActive ) + IF ::lActive Wvt_DrawLine( ::nTop, ::nLeft, ::nBottom, ::nRight, 0, 1, 2, , , ::nRGBSep ) ENDIF @@ -1681,7 +1681,7 @@ CREATE CLASS WvtToolButton FROM WvtObject VAR cFileImage VAR nCurState INIT 0 VAR nBtnType INIT TLB_BUTTON_TYPE_IMAGE - VAR aPxlOffSet INIT { 0, - 1, - 3, 1 } + VAR aPxlOffSet INIT { 0, -1, -3, 1 } METHOD New( oParent ) METHOD create() @@ -3084,7 +3084,7 @@ METHOD wvtMenu:DelItem( nItemNum ) METHOD wvtMenu:EnableItem( nItemNum ) - LOCAL nPrevious := - 1 + LOCAL nPrevious := -1 IF ! Empty( ::hMenu ) .AND. ! Empty( nItemNum ) nPrevious := Wvt_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_ENABLED ) @@ -3094,7 +3094,7 @@ METHOD wvtMenu:EnableItem( nItemNum ) METHOD wvtMenu:DisableItem( nItemNum ) - LOCAL nPrevious := - 1 + LOCAL nPrevious := -1 IF ! Empty( ::hMenu ) .AND. ! Empty( nItemNum ) nPrevious := Wvt_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_GRAYED ) @@ -3153,7 +3153,7 @@ ENDCLASS METHOD WvtConsole:New( oParent ) - ::Super:New( oParent, DLG_OBJ_CONSOLE, , - 1, - 1, - 1, - 1 ) + ::Super:New( oParent, DLG_OBJ_CONSOLE, , -1, -1, -1, -1 ) RETURN Self diff --git a/harbour/contrib/gtwvg/combobox.prg b/harbour/contrib/gtwvg/combobox.prg index 33998d8ada..dc3b55c4ce 100644 --- a/harbour/contrib/gtwvg/combobox.prg +++ b/harbour/contrib/gtwvg/combobox.prg @@ -261,7 +261,7 @@ METHOD WvgComboBox:addItem( cItem ) RETURN ::sendCBMessage( CB_ADDSTRING, cItem ) ENDIF - RETURN - 1 + RETURN -1 METHOD WvgComboBox:listBoxFocus( lFocus ) diff --git a/harbour/contrib/gtwvg/crt.prg b/harbour/contrib/gtwvg/crt.prg index 2314ac3958..315d99f401 100644 --- a/harbour/contrib/gtwvg/crt.prg +++ b/harbour/contrib/gtwvg/crt.prg @@ -317,7 +317,7 @@ METHOD WvgCrt:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) IF HB_ISNUMERIC( ::icon ) hb_gtInfo( HB_GTI_ICONRES, ::icon ) ELSE - IF ( ".ico" $ Lower( ::icon ) ) + IF ".ico" $ Lower( ::icon ) hb_gtInfo( HB_GTI_ICONFILE, ::icon ) ELSE hb_gtInfo( HB_GTI_ICONRES, ::icon ) @@ -910,7 +910,7 @@ METHOD WvgCrt:quit( xParam, xParam1 ) METHOD WvgCrt:resize( xParam ) - IF HB_ISBLOCK( xParam )/* .or. HB_ISNIL( xParam ) */ + IF HB_ISBLOCK( xParam ) /* .OR. HB_ISNIL( xParam ) */ ::sl_resize := xParam RETURN NIL ENDIF diff --git a/harbour/contrib/gtwvg/menubar.prg b/harbour/contrib/gtwvg/menubar.prg index a7c5372e5f..9ae29066cf 100644 --- a/harbour/contrib/gtwvg/menubar.prg +++ b/harbour/contrib/gtwvg/menubar.prg @@ -168,13 +168,13 @@ METHOD WvgMenuBar:create( oParent, aPresParams, lVisible ) Wvg_SetMenu( ::oParent:getHWND(), ::hMenu ) #endif - /* how to make menu invisible ? */ - IF ( ::visible ) #if 0 + /* how to make menu invisible ? */ + IF ::visible Wvg_ShowWindow( ::oParent:getHWND(), SW_MINIMIZE ) Wvg_ShowWindow( ::oParent:getHWND(), SW_NORMAL ) -#endif ENDIF +#endif ::oParent:oMenu := Self @@ -263,7 +263,7 @@ METHOD WvgMenuBar:addItem( aItem, p2, p3, p4 ) nAttrib := p4 ENDIF - RETURN ::putItem( { xCaption, bAction, nStyle, nAttrib }, - 1, .T. ) + RETURN ::putItem( { xCaption, bAction, nStyle, nAttrib }, -1, .T. ) METHOD WvgMenuBar:putItem( aItem, nPos, lInsert ) @@ -389,7 +389,7 @@ METHOD WvgMenuBar:findMenuPosById( nId ) METHOD WvgMenuBar:checkItem( nItemNum, lCheck ) - LOCAL nRet := - 1 + LOCAL nRet := -1 __defaultNIL( @lCheck, .T. ) diff --git a/harbour/contrib/gtwvg/statbar.prg b/harbour/contrib/gtwvg/statbar.prg index 49ed765acd..525eff6a3a 100644 --- a/harbour/contrib/gtwvg/statbar.prg +++ b/harbour/contrib/gtwvg/statbar.prg @@ -120,7 +120,7 @@ METHOD WvgStatusBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ::show() ENDIF - ::addItem( , , , , , - 1 ) + ::addItem( , , , , , -1 ) RETURN Self diff --git a/harbour/contrib/gtwvg/static.prg b/harbour/contrib/gtwvg/static.prg index a59a8ae688..5117157e72 100644 --- a/harbour/contrib/gtwvg/static.prg +++ b/harbour/contrib/gtwvg/static.prg @@ -120,16 +120,16 @@ METHOD WvgStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) SWITCH ::type CASE WVGSTATIC_TYPE_TEXT - IF ( hb_bitAnd( ::options, WVGSTATIC_TEXT_LEFT ) == WVGSTATIC_TEXT_LEFT ) + IF hb_bitAnd( ::options, WVGSTATIC_TEXT_LEFT ) == WVGSTATIC_TEXT_LEFT ::style += SS_LEFT /*+ SS_LEFTNOWORDWRAP */ ENDIF - IF ( hb_bitAnd( ::options, WVGSTATIC_TEXT_RIGHT ) == WVGSTATIC_TEXT_RIGHT ) + IF hb_bitAnd( ::options, WVGSTATIC_TEXT_RIGHT ) == WVGSTATIC_TEXT_RIGHT ::style += SS_RIGHT ENDIF - IF ( hb_bitAnd( ::options, WVGSTATIC_TEXT_CENTER ) == WVGSTATIC_TEXT_CENTER ) + IF hb_bitAnd( ::options, WVGSTATIC_TEXT_CENTER ) == WVGSTATIC_TEXT_CENTER ::style += SS_CENTER ENDIF - IF ( hb_bitAnd( ::options, WVGSTATIC_TEXT_WORDBREAK ) == WVGSTATIC_TEXT_WORDBREAK ) + IF hb_bitAnd( ::options, WVGSTATIC_TEXT_WORDBREAK ) == WVGSTATIC_TEXT_WORDBREAK ::style -= SS_LEFTNOWORDWRAP ENDIF EXIT @@ -189,11 +189,11 @@ METHOD WvgStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) #if 1 /* Options */ - IF ( AScan( { WVGSTATIC_TYPE_FGNDFRAME, WVGSTATIC_TYPE_BGNDFRAME, WVGSTATIC_TYPE_HALFTONEFRAME }, ::type ) > 0 ) - IF ( hb_bitAnd( ::options, WVGSTATIC_FRAMETHIN ) == WVGSTATIC_FRAMETHIN ) + IF AScan( { WVGSTATIC_TYPE_FGNDFRAME, WVGSTATIC_TYPE_BGNDFRAME, WVGSTATIC_TYPE_HALFTONEFRAME }, ::type ) > 0 + IF hb_bitAnd( ::options, WVGSTATIC_FRAMETHIN ) == WVGSTATIC_FRAMETHIN ::style += WS_BORDER - ELSEIF ( hb_bitAnd( ::options, WVGSTATIC_FRAMETHICK ) == WVGSTATIC_FRAMETHICK ) + ELSEIF hb_bitAnd( ::options, WVGSTATIC_FRAMETHICK ) == WVGSTATIC_FRAMETHICK ::style += WS_DLGFRAME ENDIF diff --git a/harbour/contrib/gtwvg/syswnd.prg b/harbour/contrib/gtwvg/syswnd.prg index 20ca0abc7f..12ed958734 100644 --- a/harbour/contrib/gtwvg/syswnd.prg +++ b/harbour/contrib/gtwvg/syswnd.prg @@ -290,7 +290,7 @@ METHOD create( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialo IF ::viewPrinterFonts .AND. ::oPrinterPS == NIL ::viewPrinterFonts := .F. ENDIF - IF ( ! ::viewScreenFonts .AND. ! ::viewPrinterFonts ) + IF ! ::viewScreenFonts .AND. ! ::viewPrinterFonts ::viewScreenFonts := .T. ENDIF diff --git a/harbour/contrib/gtwvg/tests/_modal.prg b/harbour/contrib/gtwvg/tests/_modal.prg index 8d5ae0860c..44b415e276 100644 --- a/harbour/contrib/gtwvg/tests/_modal.prg +++ b/harbour/contrib/gtwvg/tests/_modal.prg @@ -293,7 +293,7 @@ FUNCTION CreateOCrt( nT, nL, nB, nR, cTitle, xIcon, lModal, lRowCols, lHidden, ; IF HB_ISNUMERIC( xIcon ) hb_gtInfo( HB_GTI_ICONRES, xIcon ) ELSE - IF ( ".ico" $ Lower( xIcon ) ) + IF ".ico" $ Lower( xIcon ) hb_gtInfo( HB_GTI_ICONFILE, xIcon ) ELSE IF ".bmp" $ Lower( xIcon ) diff --git a/harbour/contrib/gtwvg/wnd.prg b/harbour/contrib/gtwvg/wnd.prg index 8a8c1b9ac0..959bfad6d3 100644 --- a/harbour/contrib/gtwvg/wnd.prg +++ b/harbour/contrib/gtwvg/wnd.prg @@ -1029,7 +1029,7 @@ METHOD WvgWindow:resize( xParam, xParam1 ) RETURN Self ENDIF - IF HB_ISBLOCK( xParam ) /*.or. HB_ISNIL( xParam )*/ + IF HB_ISBLOCK( xParam ) /* .OR. HB_ISNIL( xParam )*/ ::sl_resize := xParam RETURN NIL ENDIF diff --git a/harbour/contrib/hbgd/tests/test_out.prg b/harbour/contrib/hbgd/tests/test_out.prg index f3b7ea2ce1..3a14e07a4c 100644 --- a/harbour/contrib/hbgd/tests/test_out.prg +++ b/harbour/contrib/hbgd/tests/test_out.prg @@ -330,14 +330,18 @@ FUNCTION URLDecode( cStr ) ENDCASE - // IF ( cRet[ i ] > "9" .or. cRet[ i ] < "0" ) .AND. !( cRet[ i ] == "." ) - // lNumeric := .F. - // ENDIF +#if 0 + IF ( cRet[ i ] > "9" .OR. cRet[ i ] < "0" ) .AND. !( cRet[ i ] == "." ) + lNumeric := .F. + ENDIF +#endif NEXT - // IF lNumeric - // cRet := Val( cRet ) - // ENDIF +#if 0 + IF lNumeric + cRet := Val( cRet ) + ENDIF +#endif RETURN cRet diff --git a/harbour/contrib/hbmysql/tmysql.prg b/harbour/contrib/hbmysql/tmysql.prg index e16ecd4947..4651a39299 100644 --- a/harbour/contrib/hbmysql/tmysql.prg +++ b/harbour/contrib/hbmysql/tmysql.prg @@ -429,7 +429,7 @@ METHOD Skip( nRows ) CLASS TMySQLQuery ELSEIF nRows < 0 // Negative movement // DAVID: ::nCurRow := Max( ::nCurRow + nRows, 1 ) - IF ( ( ::RecNo() + nRows ) + 0 ) < 1 + IF ( ::RecNo() + nRows ) < 1 nRows := - ::RecNo() + 1 // Clipper: only SKIP movement can set Bof() to .T. ::lBof := .T. // Try to skip before first record @@ -437,7 +437,7 @@ METHOD Skip( nRows ) CLASS TMySQLQuery ELSE // positive movement // DAVID: ::nCurRow := Min( ::nCurRow + nRows, ::nNumRows ) - IF ( ( ::RecNo() + nRows ) + 0 ) > ::LastRec() + IF ( ::RecNo() + nRows ) > ::LastRec() nRows := ::LastRec() - ::RecNo() + 1 ENDIF ENDIF diff --git a/harbour/contrib/rddads/ads.ch b/harbour/contrib/rddads/ads.ch index 75f84158fb..310fae6640 100644 --- a/harbour/contrib/rddads/ads.ch +++ b/harbour/contrib/rddads/ads.ch @@ -320,4 +320,4 @@ ) ; [; dbSetIndex( <(index1)> )] ; [; dbSetIndex( <(indexn)> )] ; - ; ENDIF + ; END diff --git a/harbour/contrib/xhb/decode.prg b/harbour/contrib/xhb/decode.prg index 9f29d80083..d3ba03842f 100644 --- a/harbour/contrib/xhb/decode.prg +++ b/harbour/contrib/xhb/decode.prg @@ -79,7 +79,7 @@ FUNCTION hb_Decode( ... ) nParams := Len( aParams ) // if I have a odd number of members, last is default - IF ( nParams % 2 != 0 ) + IF nParams % 2 != 0 xDefault := ATail( aParams ) // Resize again deleting last hb_ADel( aParams, nParams, .T. ) @@ -89,8 +89,8 @@ FUNCTION hb_Decode( ... ) // Ok because I have no other value than default, I will check if it is a complex value // like an array or an hash, so I can get it to decode values IF xDefault != NIL .AND. ; - ( HB_ISARRAY( xDefault ) .OR. ; - HB_ISHASH( xDefault ) ) + ( HB_ISARRAY( xDefault ) .OR. ; + HB_ISHASH( xDefault ) ) // If it is an array I will restart this function creating a linear call IF HB_ISARRAY( xDefault ) .AND. Len( xDefault ) > 0 diff --git a/harbour/contrib/xhb/hbdll.ch b/harbour/contrib/xhb/hbdll.ch index 7a2247edbb..e896b7ecd5 100644 --- a/harbour/contrib/xhb/hbdll.ch +++ b/harbour/contrib/xhb/hbdll.ch @@ -74,10 +74,10 @@ THREAD STATIC t_cTemplate ;; IF t_cTemplate == NIL ;; t_cTemplate := DllPrepareCall( <(DllName)>, iif( <.CallConvention.>, , DC_CALL_STD ), iif( <.DllFuncName.>, #, # ) ) ;; - ENDIF ;; + END ;; IF <.ArgName.>;; RETURN DllExecuteCall( t_cTemplate, [, ] ) ;; - ENDIF ;; + END ;; RETURN DllExecuteCall( t_cTemplate ) #xcommand IMPORT [] [ ] ; @@ -86,10 +86,10 @@ THREAD STATIC t_cTemplate ;; IF t_cTemplate == NIL ;; t_cTemplate := DllPrepareCall( <(DllName)>, iif( <.CallConvention.>, , DC_CALL_STD ), iif( <.DllFuncName.>, #, # ) ) ;; - ENDIF ;; + END ;; IF <.ArgName.>;; RETURN DllExecuteCall( t_cTemplate, [, ] ) ;; - ENDIF ;; + END ;; RETURN DllExecuteCall( t_cTemplate ) @@ -99,10 +99,10 @@ THREAD STATIC t_cTemplate ;; IF t_cTemplate == NIL ;; t_cTemplate := DllPrepareCall( <(DllName)>, iif( <.CallConvention.>, , DC_CALL_STD ), iif( <.DllFuncName.>, #, # ) ) ;; - ENDIF ;; + END ;; IF <.ArgName.>;; RETURN DllExecuteCall( t_cTemplate, [, ] ) ;; - ENDIF ;; + END ;; RETURN DllExecuteCall( t_cTemplate ) #xcommand IMPORT [] [ ] ; @@ -111,10 +111,10 @@ THREAD STATIC t_cTemplate ;; IF t_cTemplate == NIL ;; t_cTemplate := DllPrepareCall( <(DllName)>, iif( <.CallConvention.>, , DC_CALL_STD ), iif( <.DllFuncName.>, #, # ) ) ;; - ENDIF ;; + END ;; IF <.ArgName.>;; RETURN DllExecuteCall( t_cTemplate, [, ] ) ;; - ENDIF ;; + END ;; RETURN DllExecuteCall( t_cTemplate ) // FoxPro syntax @@ -123,7 +123,7 @@ THREAD STATIC t_cTemplate ;; IF t_cTemplate == NIL ;; t_cTemplate := DllPrepareCall( <(DllName)>, DC_CALL_STD, iif( <.DllFuncName.>, <(DllFuncName)>, # ) ) ;; - ENDIF ;; + END ;; RETURN DllExecuteCall( t_cTemplate, ... ) // FWH @@ -132,7 +132,7 @@ THREAD STATIC t_cTemplate ;; IF t_cTemplate == NIL ;; t_cTemplate := DllPrepareCall( <(DllName)>, iif( <.Pascal.>, DC_CALL_STD, DC_CALL_CDECL ), iif( <.DllFuncName.>, <(DllFuncName)>, # ) ) ;; - ENDIF ;; + END ;; RETURN DllExecuteCall( t_cTemplate [, ] [, ] ) #xcommand DLL32 [] FUNCTION ( [ AS ] [, AS ] ) AS [] [ FROM ] LIB <(DllName)> => ; @@ -140,7 +140,7 @@ THREAD STATIC t_cTemplate ;; IF t_cTemplate == NIL ;; t_cTemplate := DllPrepareCall( <(DllName)>, iif( <.Pascal.>, DC_CALL_STD, DC_CALL_CDECL ), iif( <.DllFuncName.>, <(DllFuncName)>, # ) ) ;; - ENDIF ;; + END ;; RETURN DllExecuteCall( t_cTemplate [, ] [, ] ) #endif diff --git a/harbour/contrib/xhb/hblog.ch b/harbour/contrib/xhb/hblog.ch index 8ba1998299..f83d1487f9 100644 --- a/harbour/contrib/xhb/hblog.ch +++ b/harbour/contrib/xhb/hblog.ch @@ -76,22 +76,22 @@ hb_InitStandardLog() ;; IF <.con.> ;; hb_StandardLogAdd( HB_LogConsole():New( ));; - ENDIF ;; + END ;; IF <.fil.> ;; hb_StandardLogAdd( HB_LogFile():New( , , , ));; - ENDIF ;; + END ;; IF <.mon.> ;; hb_StandardLogAdd( HB_LogInetPort():New( , ));; - ENDIF ;; + END ;; IF <.sys.> ;; hb_StandardLogAdd( HB_LogSysLog():New( , ));; - ENDIF ;; + END ;; IF <.ema.> ;; hb_StandardLogAdd( HB_LogEmail():New( ,,,,,));; - ENDIF ;; + END ;; IF <.dbg.> ;; hb_StandardLogAdd( HB_LogDebug():New( , ) ) ;; - ENDIF ;; + END ;; hb_StandardLogName( );; hb_OpenStandardLog() diff --git a/harbour/contrib/xhb/ttable.ch b/harbour/contrib/xhb/ttable.ch index 9bfeca952f..9cab3952c1 100644 --- a/harbour/contrib/xhb/ttable.ch +++ b/harbour/contrib/xhb/ttable.ch @@ -77,8 +77,8 @@ #xcommand DEFAULT TO [, TO ] ; => ; - IF == NIL ; := ; ENDIF ; - [; IF == NIL ; := ; ENDIF ] + IF == NIL ; := ; END ; + [; IF == NIL ; := ; END ] // --> OOPs #xtranslate BYNAME [, ] => :: := [; :: := ] diff --git a/harbour/contrib/xhb/xhbtedit.prg b/harbour/contrib/xhb/xhbtedit.prg index 1c9c87936e..33a38c3e91 100644 --- a/harbour/contrib/xhb/xhbtedit.prg +++ b/harbour/contrib/xhb/xhbtedit.prg @@ -1168,7 +1168,7 @@ METHOD GoTop() CLASS XHBEditor METHOD Right() CLASS XHBEditor - IF ( ::lWordWrap ) + IF ::lWordWrap // 2006/07/19 - E.F. Changed max right point to pos cursor to next. // IF ::nCol > ::nWordWrapCol .AND. ::nRow < ::LastRow() @@ -1290,7 +1290,7 @@ METHOD Left() CLASS XHBEditor // Gotocol checks for nCol > 1 also, but this saves a func call IF ::nCol == 1 - IF ( ::lWordWrap ) + IF ::lWordWrap IF ::nRow > 1 // 2006/07/19 E.F. left should be at max in the leftmost column. // @@ -1388,7 +1388,7 @@ METHOD K_Mouse( nKey ) CLASS XHBEditor nRow := MRow() nCol := MCol() - IF ( nRow >= ::nTop .AND. nRow <= ::nBottom ) + IF nRow >= ::nTop .AND. nRow <= ::nBottom IF nCol >= ::nLeft .AND. nCol <= ::nRight IF ( ::nRow + ( nJump := nRow - ::nPhysRow ) ) <= ::LastRow() ::GotoPos( Max( 1, ::nRow + nJump ), Max( 1, ::nCol + ( nCol - ::nPhysCol ) ), .T. ) @@ -1472,7 +1472,7 @@ METHOD K_Bs() CLASS XHBEditor // IF ::nCol == 1 - IF ( ::lWordWrap ) + IF ::lWordWrap IF ::nRow > 1 .AND. ::nRow <= ::LastRow() @@ -1550,7 +1550,7 @@ METHOD K_Del() CLASS XHBEditor RETURN Self ENDIF - IF ::nCol > ::LineLen( ::nRow ) // .and. ::nRow < ::LastRow() + IF ::nCol > ::LineLen( ::nRow ) // .AND. ::nRow < ::LastRow() // eventually pad. // // IF ::nCol > ::LineLen( ::nRow ) + 1 @@ -2082,10 +2082,11 @@ STATIC FUNCTION GetParagraph( oSelf, nRow ) EXIT ENDIF // GAD This is not needed and will corrupt long lines that do not have any spaces with wordwrap on. -/* IF Len( cLine ) > 0 .and. !( Right( cLine, 1 ) == " " ) +#if 0 + IF Len( cLine ) > 0 .AND. !( Right( cLine, 1 ) == " " ) cLine += " " ENDIF -*/ +#endif ENDDO // Last line, or only one line @@ -2583,8 +2584,8 @@ METHOD SetTextSelection( cAction, nCount ) CLASS XHBEditor // if columns was already selected before... // IF ( ::nRowSelStart == 0 .AND. ::nRowSelEnd == 0 ) .OR. ; - ( ::nRowSelEnd - ::nRowSelStart == 1 .AND. ; - ::nColSelStart > 0 .AND. ::nColSelEnd > 0 ) + ( ::nRowSelEnd - ::nRowSelStart == 1 .AND. ; + ::nColSelStart > 0 .AND. ::nColSelEnd > 0 ) ::nColSelStart := ::nColSelEnd := 0 ::nRowSelStart := ::nRow diff --git a/harbour/extras/gtwvw/tests/_wvwmous.prg b/harbour/extras/gtwvw/tests/_wvwmous.prg index 6a93ed467b..8b0cf8918b 100644 --- a/harbour/extras/gtwvw/tests/_wvwmous.prg +++ b/harbour/extras/gtwvw/tests/_wvwmous.prg @@ -318,7 +318,7 @@ METHOD DRAW( nWinNum ) CLASS WVWMouseButton LOCAL nROw := Row(), nCol := Col() LOCAL nOldCursor := SetCursor( SC_NONE ) - LOCAL lMouseOver := ::lHover // 20040303,was: ( mrow() >= ::nrow1 .and. mrow() <= ::nrow2 .and. mcol() >= ::ncol1 .and. mcol() <= ::ncol2 ) + LOCAL lMouseOver := ::lHover // 20040303,was: ( MRow() >= ::nrow1 .AND. MRow() <= ::nrow2 .AND. MCol() >= ::ncol1 .AND. MCol() <= ::ncol2 ) LOCAL lPressed := ::lPressed .AND. lMouseOver LOCAL aFontInfo := iif( ::nCaptionHeight == NIL, wvw_getFontInfo( nWinNum ), NIL ) LOCAL nLabelColor := iif( ! lPressed, rgb( 0, 0, 0 ), rgb( 96, 96, 96 ) ) diff --git a/harbour/extras/gtwvw/tests/wvt2wvw.ch b/harbour/extras/gtwvw/tests/wvt2wvw.ch index 1be4f58100..9aa068a2c9 100644 --- a/harbour/extras/gtwvw/tests/wvt2wvw.ch +++ b/harbour/extras/gtwvw/tests/wvt2wvw.ch @@ -72,10 +72,10 @@ PART-2: WINDOW DEPENDENT (additional nWinNum parameter) Notes: nWinNum parameter passed as NIL will be translated by gtwvw into : - IF ! MainCoordMode - Current Window - ELSE + IF MainCoordMode Topmost Window + ELSE + Current Window ENDIF Since gtwvt application can't be in MainCoordMode, diff --git a/harbour/extras/hbdoc/hbdoc.prg b/harbour/extras/hbdoc/hbdoc.prg index 2a15bbe9a3..d53e808992 100644 --- a/harbour/extras/hbdoc/hbdoc.prg +++ b/harbour/extras/hbdoc/hbdoc.prg @@ -404,7 +404,7 @@ STATIC PROCEDURE ProcessFolder( cFolder, aContent ) // this is a recursive proce IF !( aFiles[ idx ][ F_NAME ] == "." ) .AND. ; !( aFiles[ idx ][ F_NAME ] == ".." ) - IF ( p_hsSwitches[ "source" ] .OR. p_hsSwitches[ "contribs" ] ) + IF p_hsSwitches[ "source" ] .OR. p_hsSwitches[ "contribs" ] /* .AND. AScan( s_aSkipDirs, {| d | Lower( d ) == Lower( aFiles[ idx ][ F_NAME ] ) } ) == 0 */ ProcessFolder( cFolder + aFiles[ idx ][ F_NAME ], @aContent ) ENDIF diff --git a/harbour/extras/hbvpdf/core.prg b/harbour/extras/hbvpdf/core.prg index daa997a359..00d3cab857 100644 --- a/harbour/extras/hbvpdf/core.prg +++ b/harbour/extras/hbvpdf/core.prg @@ -1958,8 +1958,8 @@ FUNCTION pdfTIFFInfo( cFile ) // Alert( "Wrong Type for BitsPerSample" ) ENDIF nBits := nTemp - // IF nTemp != 4 .and. nTemp != 8 - // Alert( "Wrong Value for BitsPerSample" ) + // IF nTemp != 4 .AND. nTemp != 8 + // Alert( "Wrong Value for BitsPerSample" ) // ENDIF CASE nTag == 259 /* @@ -1986,7 +1986,7 @@ FUNCTION pdfTIFFInfo( cFile ) ELSE // Alert( "Wrong Type for Compression" ) ENDIF*/ - // IF nTemp != 1 .and. nTemp != 2 .and. nTemp != 32773 + // IF nTemp != 1 .AND. nTemp != 2 .AND. nTemp != 32773 // Alert( "Wrong Value for Compression" ) // ENDIF CASE nTag == 262 diff --git a/harbour/extras/httpsrv/cgifunc.prg b/harbour/extras/httpsrv/cgifunc.prg index 07a18febdf..349db42a73 100644 --- a/harbour/extras/httpsrv/cgifunc.prg +++ b/harbour/extras/httpsrv/cgifunc.prg @@ -90,7 +90,7 @@ FUNCTION uhttpd_GetVars( cFields, cSeparator ) ELSE // now check if variable already exists. If yes and I have already another element // with same name, then I will change it to an array - IF ( hb_HPos( hHashVars, cName ) ) > 0 + IF hb_HPos( hHashVars, cName ) > 0 IF ! HB_ISARRAY( hHashVars[ cName ] ) // Transform it to array hHashVars[ cName ] := { hHashVars[ cName ] } diff --git a/harbour/extras/httpsrv/session.prg b/harbour/extras/httpsrv/session.prg index 600e45fc9d..96ad2723bb 100644 --- a/harbour/extras/httpsrv/session.prg +++ b/harbour/extras/httpsrv/session.prg @@ -653,7 +653,7 @@ METHOD SessionRead( cID ) CLASS uhttpd_Session nFileSize := FSeek( nH, 0, FS_END ) FSeek( nH, 0, FS_SET ) cBuffer := Space( nFileSize ) - IF ( FRead( nH, @cBuffer, nFileSize ) ) != nFileSize + IF FRead( nH, @cBuffer, nFileSize ) != nFileSize // uhttpd_Die( "ERROR: On reading session file : " + cFile + ", File error : " + hb_CStr( FError() ) ) hb_idleSleep( ::nFileWait / 1000 ) LOOP @@ -693,7 +693,7 @@ METHOD SessionWrite( cID, cData ) CLASS uhttpd_Session IF nFileSize > 0 DO WHILE nRetry++ <= ::nFileRetry IF ( nH := hb_FCreate( cFile, FC_NORMAL, FO_READWRITE + FO_DENYWRITE ) ) != F_ERROR - IF ( FWrite( nH, @cData, nFileSize ) ) != nFileSize + IF FWrite( nH, @cData, nFileSize ) != nFileSize uhttpd_Die( "ERROR: On writing session file : " + cFile + ", File error : " + hb_CStr( FError() ) ) ELSE lOk := .T. diff --git a/harbour/extras/httpsrv/uhttpd.prg b/harbour/extras/httpsrv/uhttpd.prg index b17184d8f9..41a4ea43fe 100644 --- a/harbour/extras/httpsrv/uhttpd.prg +++ b/harbour/extras/httpsrv/uhttpd.prg @@ -1159,15 +1159,15 @@ STATIC FUNCTION ParseRequest( cRequest ) _SERVER[ "SCRIPT_NAME" ] := hUrl[ "URI" ] _SERVER[ "QUERY_STRING" ] := hUrl[ "QUERY" ] - /* - IF ( nI := AT( "?", _SERVER[ "REQUEST_URI" ] ) ) > 0 - _SERVER[ "SCRIPT_NAME" ] := LEFT( _SERVER[ "REQUEST_URI" ], nI - 1) - _SERVER[ "QUERY_STRING" ] := SUBSTR( _SERVER[ "REQUEST_URI" ], nI + 1) +#if 0 + IF ( nI := At( "?", _SERVER[ "REQUEST_URI" ] ) ) > 0 + _SERVER[ "SCRIPT_NAME" ] := Left( _SERVER[ "REQUEST_URI" ], nI - 1 ) + _SERVER[ "QUERY_STRING" ] := SubStr( _SERVER[ "REQUEST_URI" ], nI + 1 ) ELSE _SERVER[ "SCRIPT_NAME" ] := _SERVER[ "REQUEST_URI" ] _SERVER[ "QUERY_STRING" ] := "" ENDIF - */ +#endif FOR nI := 2 TO Len( aRequest ) IF aRequest[ nI ] == ""; EXIT @@ -1682,15 +1682,6 @@ PROCEDURE uhttpd_SetHeader( cType, cValue ) FUNCTION uhttpd_GetHeader( cType ) RETURN uhttpd_HGetValue( _HTTP_RESPONSE, cType ) -/* - __defaultNIL( @nPos, 1 ) - - nPos := hb_HPos( hHash, cKey )) - IF ( nPos := ASCAN( t_aHeader, {| x | UPPER( x[ 1 ] ) == UPPER( cType ) }, nPos ) ) > 0 - RETURN t_aHeader[ nPos, 2 ] - ENDIF - RETURN NIL -*/ PROCEDURE uhttpd_DelHeader( cType ) @@ -1701,14 +1692,6 @@ PROCEDURE uhttpd_DelHeader( cType ) ENDIF RETURN -/* - LOCAL nI - - IF ( nI := ASCAN( t_aHeader, {| x | UPPER( x[ 1 ] ) == UPPER( cType ) } ) ) > 0 - hb_aDel( t_aHeader, nI, .T. ) - ENDIF - RETURN -*/ PROCEDURE uhttpd_Write( cString ) @@ -2817,7 +2800,7 @@ STATIC FUNCTION Handler_CgiScript( cFileName ) WriteToConsole( "Executing: " + cFileName ) - IF ( CGIExec( uhttpd_OSFileName( cFileName ), @xResult ) ) == 0 + IF CGIExec( uhttpd_OSFileName( cFileName ), @xResult ) == 0 // uhttpd_SetHeader( "Content-Type", cI ) // uhttpd_Write( xResult ) diff --git a/harbour/extras/rddado/adordd.ch b/harbour/extras/rddado/adordd.ch index 49b2d9399b..0209667b46 100644 --- a/harbour/extras/rddado/adordd.ch +++ b/harbour/extras/rddado/adordd.ch @@ -210,7 +210,7 @@ [ HB_AdoSetQuery( ) ; ] ; [ HB_AdoSetUser( ); HB_AdoSetPassword( ) ; ] ; dbUseArea( <.nw.>, , <(db)>, <(a)>, ; - iif( <.sh.> .or. <.ex.>, ! <.ex.>, NIL), <.ro.> [, ] ) ; + iif( <.sh.> .OR. <.ex.>, ! <.ex.>, NIL ), <.ro.> [, ] ) ; [; dbSetIndex( <(index1)> )] ; [; dbSetIndex( <(indexN)> )] diff --git a/harbour/include/assert.ch b/harbour/include/assert.ch index b8f12a89eb..d5b62929c2 100644 --- a/harbour/include/assert.ch +++ b/harbour/include/assert.ch @@ -70,7 +70,7 @@ iif( <.msg.>, , <"exp"> ) ; ) ; ; QUIT ; - ; ENDIF + ; END #endif /* NDEBUG */ diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index 0288988fe5..7526dc653d 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -252,13 +252,13 @@ DECLARE HBClass ; [ ] ; [ ] [ FUNCTION ] => ; _HB_CLASS ;; - function __HB_CLS_OPT([,] ) ( HB_CLS_PARAM_LIST ) ;; - static s_oClass ;; - local nScope, oClass, oInstance ;; - if s_oClass == NIL .and. __clsLockDef( @s_oClass ) ;; - begin sequence ;; + function __HB_CLS_OPT( [,] ) ( HB_CLS_PARAM_LIST ) ;; + STATIC s_oClass ;; + LOCAL nScope, oClass, oInstance ;; + IF s_oClass == NIL .AND. __clsLockDef( @s_oClass ) ;; + BEGIN SEQUENCE ;; nScope := HB_OO_CLSTP_EXPORTED ; HB_SYMBOL_UNUSED( nScope ) ;; - oClass := iif(<.metaClass.>, <(metaClass)>, HBClass():new( <(ClassName)> , __HB_CLS_PAR( [ @() ] [ , @() ] ), @__HB_CLS_OPT([__HB_CLS_ASID(),] )() [, <.modulfriend.> ] ) ) ;; + oClass := iif( <.metaClass.>, <(metaClass)>, HBClass():new( <(ClassName)>, __HB_CLS_PAR( [ @() ] [ , @() ] ), @__HB_CLS_OPT([__HB_CLS_ASID(),] )() [, <.modulfriend.> ] ) ) ;; #undef _CLASS_NAME_ ; #define _CLASS_NAME_ ;; #undef _CLASS_MODE_ ; #define _CLASS_MODE_ _CLASS_DECLARATION_ ; [ ; #translate Super( ): => ::: ] ; @@ -269,16 +269,16 @@ DECLARE HBClass ; #xcommand ENDCLASS [] => ; oClass:Create() ; [<-lck-> __clsLock( oClass:hClass ) ] ;; - always ;; + ALWAYS ;; __clsUnlockDef( @s_oClass, oClass ) ;; - end sequence ;; + END SEQUENCE ;; oInstance := oClass:Instance() ;; - if __objHasMsg( oInstance, "InitClass" ) ;; + IF __objHasMsg( oInstance, "InitClass" ) ;; oInstance:InitClass( HB_CLS_PARAM_LIST ) ;; - end ;; - return oInstance ;; - end ;; - return s_oClass:Instance() AS CLASS _CLASS_NAME_ ;; + END ;; + RETURN oInstance ;; + END ;; + RETURN s_oClass:Instance() AS CLASS _CLASS_NAME_ ;; #undef _CLASS_MODE_ ; #define _CLASS_MODE_ _CLASS_IMPLEMENTATION_ diff --git a/harbour/include/hbsix.ch b/harbour/include/hbsix.ch index 2afaad5fbb..ed20e37f4b 100644 --- a/harbour/include/hbsix.ch +++ b/harbour/include/hbsix.ch @@ -83,7 +83,7 @@ [sx_SetTrigger( TRIGGER_PENDING, , ); ] <-trig-> ; [sx_SetPass( , 1, ); ] <-pass-> ; dbUseArea( <.nw.>, , <(db)>, <(a)>, ; - iif(<.sh.> .or. <.ex.>, ! <.ex.>, NIL), <.ro.> [, ] ) ; + iif( <.sh.> .OR. <.ex.>, ! <.ex.>, NIL ), <.ro.> [, ] ) ; [; dbSetIndex( <(index1)> )] ; [; dbSetIndex( <(indexN)> )] diff --git a/harbour/src/rtl/hbgtcore.c b/harbour/src/rtl/hbgtcore.c index a2c56854c2..e53506e4c1 100644 --- a/harbour/src/rtl/hbgtcore.c +++ b/harbour/src/rtl/hbgtcore.c @@ -91,7 +91,7 @@ void hb_gt_BaseFree( PHB_GT pGT ) /* helper internal function */ static void hb_gt_def_BaseInit( PHB_GT_BASE pGT ) { - pGT->fVgaCell = HB_FALSE; + pGT->fVgaCell = HB_TRUE; pGT->fIsColor = HB_TRUE; pGT->fBlinking = HB_TRUE; pGT->fStdOutCon = HB_FALSE;