From 2da1437ec695be224ec7786b28f1223ecf72565e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 20 Feb 2010 03:51:10 +0000 Subject: [PATCH] 2010-02-20 04:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * include/hbsetup.ch * src/common/hbverdsp.c - Deleted HB_COMPAT_XPP option. It's no longer used in Harbour. From this point all Xbase++ compatibility functions and core classes are implemented in 'xpp' contrib library (name tentative). Add it to your lib list, if you need Xbase++ compatible functions. IOW HB_COMPAT_XPP build time option got converted to a app link time option. * src/rtl/isprint.c - Deleted dirty Xbase++ extension of ISPRINTER(). Now it's purely Clipper compatible in default build. INCOMPATIBLE. For Xbase++ version, use XPP_ISPRINTER() (or HB_ISPRINTER() which is the exact same). * src/rtl/tobject.prg * src/rtl/transfrm.c * src/rtl/memoedit.prg * include/memoedit.ch * Replaced "#ifdef HB_COMPAT_XPP" with "#ifndef HB_CLP_STRICT". Which means we've endorsed these extensions in Harbour, and they are always enabled except in strict compatibility builds. * src/rdd/nulsys/nulsys.c - Deleted HB_COMPAT_XPP guarded function. * contrib/xhb/xhbver.prg * Always return .T. for _HB_COMPAT_XPP in version info. * include/box.ch * contrib/xpp/xpp.ch + Added Xbase++ compatibility box.ch constants from core box.ch. INCOMPATIBLE if you use B_THIN or B_FAT box style. * utils/hbtest/hbtest.prg * examples/hbdoc2/tmplates.prg * examples/hbdoc2/hbdoc2.prg - Deleted parts dealing with HB_COMPAT_XPP option. --- harbour/ChangeLog | 43 +++++++++++++++++++++++++++- harbour/contrib/xhb/xhbver.prg | 6 +--- harbour/contrib/xpp/xpp.ch | 8 ++++++ harbour/examples/hbdoc2/hbdoc2.prg | 1 - harbour/examples/hbdoc2/tmplates.prg | 3 +- harbour/include/box.ch | 10 ------- harbour/include/hbsetup.ch | 1 - harbour/include/memoedit.ch | 2 +- harbour/src/common/hbverdsp.c | 3 -- harbour/src/rdd/nulsys/nulsys.c | 4 --- harbour/src/rtl/isprint.c | 6 ---- harbour/src/rtl/memoedit.prg | 4 +-- harbour/src/rtl/tobject.prg | 5 ++-- harbour/src/rtl/transfrm.c | 3 +- harbour/utils/hbtest/hbtest.prg | 3 -- 15 files changed, 59 insertions(+), 43 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c93d9a2593..95b78b9960 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,47 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-20 04:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * include/hbsetup.ch + * src/common/hbverdsp.c + - Deleted HB_COMPAT_XPP option. It's no longer used in Harbour. + From this point all Xbase++ compatibility functions and core + classes are implemented in 'xpp' contrib library (name + tentative). Add it to your lib list, if you need Xbase++ + compatible functions. IOW HB_COMPAT_XPP build time option + got converted to a app link time option. + + * src/rtl/isprint.c + - Deleted dirty Xbase++ extension of ISPRINTER(). Now it's + purely Clipper compatible in default build. + INCOMPATIBLE. For Xbase++ version, use XPP_ISPRINTER() + (or HB_ISPRINTER() which is the exact same). + + * src/rtl/tobject.prg + * src/rtl/transfrm.c + * src/rtl/memoedit.prg + * include/memoedit.ch + * Replaced "#ifdef HB_COMPAT_XPP" with "#ifndef HB_CLP_STRICT". + Which means we've endorsed these extensions in Harbour, + and they are always enabled except in strict compatibility + builds. + + * src/rdd/nulsys/nulsys.c + - Deleted HB_COMPAT_XPP guarded function. + + * contrib/xhb/xhbver.prg + * Always return .T. for _HB_COMPAT_XPP in version info. + + * include/box.ch + * contrib/xpp/xpp.ch + + Added Xbase++ compatibility box.ch constants from core box.ch. + INCOMPATIBLE if you use B_THIN or B_FAT box style. + + * utils/hbtest/hbtest.prg + * examples/hbdoc2/tmplates.prg + * examples/hbdoc2/hbdoc2.prg + - Deleted parts dealing with HB_COMPAT_XPP option. + 2010-02-20 04:29 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) - src/rtl/browdbx.prg - src/rtl/mousex.c @@ -51,7 +92,7 @@ ; NOTE: INCOMPATIBLE. If you use Xbase++ function, you should now link xpp lib. (the name of the lib is not yet finalized) ; TODO: Clean remaining four HB_COMPAT_XPP guards and delete this - build-time option from core. + build-time option from core. [DONE] 2010-02-20 03:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) - contrib/hbgt/doc/en diff --git a/harbour/contrib/xhb/xhbver.prg b/harbour/contrib/xhb/xhbver.prg index d079cee22e..26b117dcd3 100644 --- a/harbour/contrib/xhb/xhbver.prg +++ b/harbour/contrib/xhb/xhbver.prg @@ -89,11 +89,7 @@ FUNCTION hb_buildinfo( n ) #else v[ _HB_COMPAT_C53 ] := .F. #endif -#ifdef HB_COMPAT_XPP - v[ _HB_COMPAT_XPP ] := .T. -#else - v[ _HB_COMPAT_XPP ] := .F. -#endif + v[ _HB_COMPAT_XPP ] := .T. /* Converted to library in Harbour. */ #ifdef HB_COMPAT_VO v[ _HB_COMPAT_VO ] := .T. #else diff --git a/harbour/contrib/xpp/xpp.ch b/harbour/contrib/xpp/xpp.ch index b5bfc1bd58..d26b093292 100644 --- a/harbour/contrib/xpp/xpp.ch +++ b/harbour/contrib/xpp/xpp.ch @@ -75,6 +75,14 @@ #xtranslate TBrowse() => xpp_TBrowse() #xtranslate Get() => xpp_Get() +/* box.ch extensions */ + +#define B_THIN ( Chr( 219 ) + Chr( 223 ) + Chr( 219 ) + Chr( 219 ) + ; + Chr( 219 ) + Chr( 220 ) + Chr( 219 ) + Chr( 219 ) ) + +#define B_FAT ( Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + ; + Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + Chr( 219 ) ) + /* NOTE: Several other Xbase++ function are currently implemented using original Xbase++ names. */ diff --git a/harbour/examples/hbdoc2/hbdoc2.prg b/harbour/examples/hbdoc2/hbdoc2.prg index e3b3ee2a9b..40d0c7fc17 100644 --- a/harbour/examples/hbdoc2/hbdoc2.prg +++ b/harbour/examples/hbdoc2/hbdoc2.prg @@ -912,7 +912,6 @@ FUNCTION Decode( cType, hsBlock, cKey ) CASE cCode == "FS" ; RETURN "This a Flagship compatibility function and is only visible if source was compiled with the HB_COMPAT_FLAGSHIP flag" CASE cCode == "H" ; RETURN "This is Harbour specific" CASE cCode == "NA" ; RETURN "Not applicable" - CASE cCode == "XPP" ; RETURN "This an Xbase++ compatibility function and is only visible if source was compiled with the HB_COMPAT_XPP flag" OTHERWISE ; RETURN "Unknown 'COMPLIANCE' code: '" + cCode + "'" ENDCASE diff --git a/harbour/examples/hbdoc2/tmplates.prg b/harbour/examples/hbdoc2/tmplates.prg index 06b9f4ad2e..3d44c63fef 100644 --- a/harbour/examples/hbdoc2/tmplates.prg +++ b/harbour/examples/hbdoc2/tmplates.prg @@ -325,8 +325,7 @@ INIT PROCEDURE Templates() { "C53", "This is CA-Cl*pper v5.3 compliant and is only visible if source was compiled with the HB_COMPAT_C53 flag" }, ; { "FS", "This a Flagship compatibility function and is only visible if source was compiled with the HB_COMPAT_FLAGSHIP flag" }, ; { "H", "This is Harbour specific" }, ; - { "NA", "Not applicable" }, ; - { "XPP", "This an Xbase++ compatibility function and is only visible if source was compiled with the HB_COMPAT_XPP flag" } ; + { "NA", "Not applicable" } ; } PUBLIC p_aPlatforms := { ; diff --git a/harbour/include/box.ch b/harbour/include/box.ch index 3dc6f432ae..343af1f95c 100644 --- a/harbour/include/box.ch +++ b/harbour/include/box.ch @@ -71,14 +71,4 @@ #define B_DOUBLE_SINGLE ( Chr( 213 ) + Chr( 205 ) + Chr( 184 ) + Chr( 179 ) + ; Chr( 190 ) + Chr( 205 ) + Chr( 212 ) + Chr( 179 ) ) -#ifdef HB_COMPAT_XPP - -#define B_THIN ( Chr( 219 ) + Chr( 223 ) + Chr( 219 ) + Chr( 219 ) + ; - Chr( 219 ) + Chr( 220 ) + Chr( 219 ) + Chr( 219 ) ) - -#define B_FAT ( Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + ; - Chr( 219 ) + Chr( 219 ) + Chr( 219 ) + Chr( 219 ) ) - -#endif - #endif /* _BOX_CH */ diff --git a/harbour/include/hbsetup.ch b/harbour/include/hbsetup.ch index 5b6eb1e0a3..d6a4b2c48a 100644 --- a/harbour/include/hbsetup.ch +++ b/harbour/include/hbsetup.ch @@ -62,7 +62,6 @@ /* #define HB_CLP_STRICT */ /* Enable Cl*pper 5.2e/5.3x strict compatibility */ #define HB_CLP_UNDOC /* Enable Cl*pper 5.2e/5.3x undocumented features */ #define HB_COMPAT_C53 /* Enable Cl*pper 5.3x extensions */ -#define HB_COMPAT_XPP /* Enable Xbase++ extensions */ #define HB_COMPAT_FLAGSHIP /* Enable Flagship extensions */ /* #define HB_COMPAT_VO */ /* Enable VO extensions */ /* #define HB_COMPAT_FOXPRO */ /* Enable FoxPro extensions */ diff --git a/harbour/include/memoedit.ch b/harbour/include/memoedit.ch index 6498835b43..61e17bf8a8 100644 --- a/harbour/include/memoedit.ch +++ b/harbour/include/memoedit.ch @@ -58,7 +58,7 @@ #define ME_UNKEY 1 /* Unknown key, memo unaltered */ #define ME_UNKEYX 2 /* Unknown key, memo altered */ #define ME_INIT 3 /* Initialization mode */ -#ifdef HB_COMPAT_XPP +#ifndef HB_CLP_STRICT #define ME_REQUEST 4 /* Memoedit requests an input from */ /* the user function, e.g. after */ /* ME_PASTE */ /* Xbase++ extension */ diff --git a/harbour/src/common/hbverdsp.c b/harbour/src/common/hbverdsp.c index 167941e1c9..13c488f115 100644 --- a/harbour/src/common/hbverdsp.c +++ b/harbour/src/common/hbverdsp.c @@ -163,9 +163,6 @@ void hb_verBuildInfo( void ) #if defined( HB_CLP_STRICT ) hb_conOutErr( "(Clipper 5.x strict) ", 0 ); #endif -#if defined( HB_COMPAT_XPP ) - hb_conOutErr( "(Xbase++) ", 0 ); -#endif #if defined( HB_COMPAT_FLAGSHIP ) hb_conOutErr( "(Flagship) ", 0 ); #endif diff --git a/harbour/src/rdd/nulsys/nulsys.c b/harbour/src/rdd/nulsys/nulsys.c index c1f6c19608..873b313eb7 100644 --- a/harbour/src/rdd/nulsys/nulsys.c +++ b/harbour/src/rdd/nulsys/nulsys.c @@ -162,10 +162,6 @@ HB_FUNC( DBSEEK ) { hb_retl( HB_FALSE ); } HB_FUNC( DBSKIP ) { hb_retni( 0 ); } -#ifdef HB_COMPAT_XPP -HB_FUNC( DBSKIPPER ) { hb_retni( 0 ); } -#endif - HB_FUNC( DBAPPEND ) {} HB_FUNC( DBRECALL ) {} diff --git a/harbour/src/rtl/isprint.c b/harbour/src/rtl/isprint.c index b4d24bcbcb..11f8a3085c 100644 --- a/harbour/src/rtl/isprint.c +++ b/harbour/src/rtl/isprint.c @@ -135,13 +135,7 @@ HB_FUNC( HB_ISPRINTER ) hb_retl( hb_printerIsReady( hb_parc( 1 ) ) ); } -/* NOTE: The parameter is an Xbase++ extension over CA-Cl*pper. [vszakats] */ - HB_FUNC( ISPRINTER ) { -#ifdef HB_COMPAT_XPP - HB_FUNC_EXEC( HB_ISPRINTER ); -#else hb_retl( hb_printerIsReady( NULL ) ); -#endif } diff --git a/harbour/src/rtl/memoedit.prg b/harbour/src/rtl/memoedit.prg index e06c40ab53..108f7211ce 100644 --- a/harbour/src/rtl/memoedit.prg +++ b/harbour/src/rtl/memoedit.prg @@ -231,8 +231,8 @@ METHOD HandleUserKey( nKey, nUserKey ) CLASS HBMemoEditor CASE nUserKey == ME_BOTTOMRIGHT ::MoveCursor( K_CTRL_END ) -#ifdef HB_COMPAT_XPP - CASE nUserKey == ME_PASTE +#ifndef HB_CLP_STRICT + CASE nUserKey == ME_PASTE /* Xbase++ compatibility */ hb_gtInfo( HB_GTI_CLIPBOARDPASTE ) #endif diff --git a/harbour/src/rtl/tobject.prg b/harbour/src/rtl/tobject.prg index 897a0146fa..ff2f319689 100644 --- a/harbour/src/rtl/tobject.prg +++ b/harbour/src/rtl/tobject.prg @@ -91,9 +91,8 @@ FUNCTION HBObject() /*oClass:AddInline( "CLASSSEL" , {| Self | __CLASSSEL( Self:CLASSH() ) }, HB_OO_CLSTP_EXPORTED ) */ /*oClass:AddInline( "EVAL" , {| Self | __EVAL( Self ) }, HB_OO_CLSTP_EXPORTED ) */ - /* Xbase++ */ -#ifdef HB_COMPAT_XPP - oClass:AddInline( "ISDERIVEDFROM" , {| Self, xPar1 | __ObjDerivedFrom( Self, xPar1 ) }, HB_OO_CLSTP_EXPORTED ) +#ifndef HB_CLP_STRICT + oClass:AddInline( "ISDERIVEDFROM" , {| Self, xPar1 | __ObjDerivedFrom( Self, xPar1 ) }, HB_OO_CLSTP_EXPORTED ) /* Xbase++ compatibility */ #endif /* Class(y) */ oClass:AddInline( "ISKINDOF" , {| Self, xPar1 | __ObjDerivedFrom( Self, xPar1 ) }, HB_OO_CLSTP_EXPORTED ) diff --git a/harbour/src/rtl/transfrm.c b/harbour/src/rtl/transfrm.c index cacc5fc375..4147d032e8 100644 --- a/harbour/src/rtl/transfrm.c +++ b/harbour/src/rtl/transfrm.c @@ -145,7 +145,8 @@ HB_FUNC( TRANSFORM ) case ')': uiPicFlags |= PF_PARNEGWOS; break; -#if defined( HB_COMPAT_XPP ) || defined( HB_COMPAT_FOXPRO ) +#ifndef HB_CLP_STRICT + /* Xbase++ and FoxPro compatibility */ case 'L': case '0': uiPicFlags |= PF_PADL; /* FoxPro/XPP extension */ diff --git a/harbour/utils/hbtest/hbtest.prg b/harbour/utils/hbtest/hbtest.prg index 6300a00196..579b93c133 100644 --- a/harbour/utils/hbtest/hbtest.prg +++ b/harbour/utils/hbtest/hbtest.prg @@ -54,9 +54,6 @@ /* EMPTY() tests written by Eddie Runia */ /* :class* tests written by Dave Pearson */ -/* NOTE: The test suite will not work if the DTOS() function is not included - in Harbour (-DHB_COMPAT_XPP). */ - /* NOTE: Always compile with /n switch */ /* NOTE: It's worth to make tests with and without the /z switch */ /* NOTE: Guard all Harbour extensions with __HARBOUR__ #ifdefs */