diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6d642cae67..76cbe0938a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,43 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-11-11 14:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * source/rtl/tpopup.prg + * source/rtl/ttopbar.prg + * source/rtl/tmenuitm.prg + ! MENUITEM class :row and :col vars changed to + :__row and :__col, instead of adding HB_EXTENSION + guards to them, because they are needed internally. + + * source/rtl/browse.prg + * source/rtl/tbrowse.prg + * Two mouse-wheel handling extensions now rather + guarded with HB_C52_STRICT. + + * source/rtl/gete.c + ! Fixed GETENV()/GETE() to return an empty string when + called with more than one parameter, to be fully + C5.x compatible. + + * source/vm/proc.c + ! PROCFILE() HB_EXTENSION guard changed to HB_C52_STRICT. + Since PROCFILE() is an undocumented function in C5.x + we can legally extend it in Harbour. + + * include/hbsetup.ch + * Turned off HB_EXTENSION for the default build. + Now HB_EXTENSION covers all the extensions which + in some ways violates namespace rules or extends + functionality of existing CA-Cl*pper functions + or classes in an "invisible" (or "dirty") way, like + adding new parameters or accepting new types of parameters. + In case we want to keep some extended functionality + in the default build, we'll need to create new + function names. For class extensions, I'm not yet + sure what is the proper way to go. + In case of ML*() functions, I think they should respect + SET EOL instead of accepting EOL settings as parameters. + 2007-11-11 13:45 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/tbrowse.prg ! Fixed to compile with HB_C52_STRICT. diff --git a/harbour/include/hbsetup.ch b/harbour/include/hbsetup.ch index b4da2991f5..e9241f2638 100644 --- a/harbour/include/hbsetup.ch +++ b/harbour/include/hbsetup.ch @@ -59,11 +59,9 @@ /* NOTE: You can select here, which features you want to include of the different Clipper implementations. */ -#define HB_EXTENSION /* Enable Harbour extensions */ - +/* #define HB_EXTENSION */ /* Enable Harbour extensions */ #define HB_C52_UNDOC /* Enable CA-Cl*pper 5.2e undocumented features */ /* #define HB_C52_STRICT */ /* Enable CA-Cl*pper 5.2e strict compatibility */ - #define HB_COMPAT_C53 /* Enable CA-Cl*pper 5.3x extensions */ #define HB_COMPAT_XPP /* Enable Alaska Xbase++ extensions */ /* #define HB_COMPAT_VO */ /* Enable CA-VO extensions */ diff --git a/harbour/source/rtl/browse.prg b/harbour/source/rtl/browse.prg index 482248e651..7437bf8010 100644 --- a/harbour/source/rtl/browse.prg +++ b/harbour/source/rtl/browse.prg @@ -150,7 +150,7 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight ) TBMOUSE( oBrw, MRow(), MCol() ) EXIT #endif -#ifdef HB_EXTENSION +#ifndef HB_C52_STRICT CASE K_MWFORWARD #endif CASE K_UP @@ -161,7 +161,7 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight ) ENDIF EXIT -#ifdef HB_EXTENSION +#ifndef HB_C52_STRICT CASE K_MWBACKWARD #endif CASE K_DOWN diff --git a/harbour/source/rtl/gete.c b/harbour/source/rtl/gete.c index c5bfe32b02..45f9ebfa81 100644 --- a/harbour/source/rtl/gete.c +++ b/harbour/source/rtl/gete.c @@ -72,7 +72,11 @@ HB_FUNC( GETENV ) { PHB_ITEM pName = hb_param( 1, HB_IT_STRING ); +#ifdef HB_EXTENSION if( pName ) +#else + if( pName && hb_pcount() == 1 ) +#endif { char * pszName = hb_itemGetC( pName ); ULONG ulName = strlen( pszName ); diff --git a/harbour/source/rtl/tbrowse.prg b/harbour/source/rtl/tbrowse.prg index 3eabffe235..8af89a1319 100644 --- a/harbour/source/rtl/tbrowse.prg +++ b/harbour/source/rtl/tbrowse.prg @@ -2086,7 +2086,7 @@ METHOD setKey( nKey, bBlock ) CLASS TBrowse { K_ESC , {| | TBR_EXIT } },; { K_LBUTTONDOWN, {| o | TBMouse( o, MRow(), MCol() ) } } } - #ifdef HB_EXTENSION + #ifndef HB_C52_STRICT AAdd( ::aKeys, { K_MWFORWARD , {| o | o:Up() , TBR_CONTINUE } } ) AAdd( ::aKeys, { K_MWBACKWARD , {| o | o:Down() , TBR_CONTINUE } } ) #endif diff --git a/harbour/source/rtl/tmenuitm.prg b/harbour/source/rtl/tmenuitm.prg index 4d965f9b30..b02a22b022 100644 --- a/harbour/source/rtl/tmenuitm.prg +++ b/harbour/source/rtl/tmenuitm.prg @@ -75,8 +75,8 @@ CREATE CLASS MENUITEM FUNCTION HBMenuItem METHOD shortcut( nShortcut ) SETGET METHOD style( cStyle ) SETGET - VAR col INIT -1 AS NUMERIC /* NOTE: This is a Harbour extension. */ - VAR row INIT -1 AS NUMERIC /* NOTE: This is a Harbour extension. */ + VAR __col INIT -1 AS NUMERIC /* NOTE: This is a Harbour extension. */ + VAR __row INIT -1 AS NUMERIC /* NOTE: This is a Harbour extension. */ METHOD isPopUp() @@ -203,10 +203,10 @@ FUNCTION __miColumn( o, nColumn ) IF ISOBJECT( o ) .AND. o:ClassName() == "MENUITEM" IF ISNUMBER( nColumn ) - o:col := nColumn + o:__col := nColumn ENDIF - RETURN o:col + RETURN o:__col ENDIF RETURN -1 @@ -216,10 +216,10 @@ FUNCTION __miRow( o, nRow ) IF ISOBJECT( o ) .AND. o:ClassName() == "MENUITEM" IF ISNUMBER( nRow ) - o:row := nRow + o:__row := nRow ENDIF - RETURN o:row + RETURN o:__row ENDIF RETURN -1 diff --git a/harbour/source/rtl/tpopup.prg b/harbour/source/rtl/tpopup.prg index 0468984eff..d1158924bb 100644 --- a/harbour/source/rtl/tpopup.prg +++ b/harbour/source/rtl/tpopup.prg @@ -267,8 +267,8 @@ METHOD display() CLASS POPUPMENU cCaption += " " ENDIF - aItems[ nPos ]:row := nTop - aItems[ nPos ]:col := nLeft + aItems[ nPos ]:__row := nTop + aItems[ nPos ]:__col := nLeft IF ( nHotKeyPos := At( "&", cCaption ) ) == 0 IF ( nCharPos := RAt( SubStr( aItems[ nPos ]:style, 2, 1 ), cCaption ) ) > 0 diff --git a/harbour/source/rtl/ttopbar.prg b/harbour/source/rtl/ttopbar.prg index 11b7060d77..77f8df70e1 100644 --- a/harbour/source/rtl/ttopbar.prg +++ b/harbour/source/rtl/ttopbar.prg @@ -180,8 +180,8 @@ METHOD display() CLASS TOPBARMENU nLeft := nRight - nCaptionLen ENDIF - aItems[ nItem ]:row := nRow - aItems[ nItem ]:col := nLeft + aItems[ nItem ]:__row := nRow + aItems[ nItem ]:__col := nLeft IF aItems[ nItem ]:isPopUp() oPopUp := aItems[ nItem ]:data @@ -352,7 +352,7 @@ METHOD hitTest( nMRow, nMCol ) CLASS TOPBARMENU FOR n := 1 TO ::nItemCount - nColumn := aItems[ n ]:col + nColumn := aItems[ n ]:__col IF nMCol >= nColumn .AND. nMCol <= nColumn + Len( aItems[ n ]:caption ) #ifndef HB_C52_STRICT diff --git a/harbour/source/vm/proc.c b/harbour/source/vm/proc.c index 18cc37193b..f10a9227fb 100644 --- a/harbour/source/vm/proc.c +++ b/harbour/source/vm/proc.c @@ -104,7 +104,7 @@ HB_FUNC( PROCLINE ) HB_FUNC( PROCFILE ) { -#ifdef HB_EXTENSION +#ifndef HB_C52_STRICT PHB_SYMB pSym = NULL; if( ISSYMBOL( 1 ) )